-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update .github/workflows/weekly-report.yml
- Loading branch information
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
@@ -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 | ||
|