Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI workflow to post open PRs to slack #78

Merged
merged 17 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
slight changes
ericbuckley committed Oct 16, 2024

Verified

This commit was signed with the committer’s verified signature.
ericbuckley Eric Buckley
commit 1a554bee4be6e8580c49ee39e0f00e0e1c78c955
7 changes: 5 additions & 2 deletions .github/workflows/slack_notifier_open_pulls.yml
Original file line number Diff line number Diff line change
@@ -20,15 +20,18 @@ jobs:
- name: List open pull requests
id: list_prs
run: >
PR_LIST=$(GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} scripts/open_pulls.sh)
scripts/open_pulls.sh
PR_LIST=$(scripts/open_pulls.sh)

MSG=":code-review Open Pull Requests\n\n"
MSG=":code-review: Open Pull Requests\n\n"

while IFS= read -r line; do
MSG+="$line\n"
done < <(echo "$PR_LIST" | jq -r '.[] | "- <\(.html_url)|\(.title)> opened by \(.user) \(.time_since) days ago"')

echo "MSG=$MSG" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Post to Slack
id: slack