Skip to content

Commit

Permalink
chore: update .github/workflows/weekly-report.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
adoyle-h committed May 22, 2024
1 parent 8f72a8c commit 9d567ab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/weekly-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ jobs:
- name: Scan
id: report
run: >
git --no-pager whatchanged --no-color --since="1 week ago" -p -U0 -- README.md |
grep -v -E -e '^ update' -e '^(diff|index|@@|\-\-\-|\+\+\+) '
# MUST use GNU sed, not BSD sed!
git --no-pager log --no-color --since='1 week ago' -p -U0 -- '*.md' ':!./_docs' |
grep -v -E -e '^ update' -e '^(Author:|index|new file mode|\-\-\-|\+\+\+) ' |
sed -e ':a;N;$!ba;s/\n\n\n/\n/g' |
sed -E '/^\s*$/ i\'$'\n''```' |
sed -E -e '/^diff / a\'$'\n''\'$'\n''```diff' -e 's|^diff --git a/(.+) b/.+|```\n\n### \1|g' -e 's|^commit (.+)|\n## Commit [\1](https://github.com/adoyle-h/Today-I-Learned/commit/\1)\n|g' |
sed -E '/^Date: /{N;s/^(Date: .+)\n```/\1/}'
- name: Create a new GitHub Discussion
uses: abirismyname/[email protected]
Expand All @@ -27,7 +32,6 @@ jobs:
body: |
What changed in last week:
```diff
${{steps.rerport.stdout}}
```
# https://github.com/marketplace/actions/create-github-discussion#obtaining-the-repository-id-and-category-id
Expand Down

0 comments on commit 9d567ab

Please sign in to comment.