generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: some ticket workflow automation
The main change is that #728 is now automatically kept up to date with assignments and labels.
- Loading branch information
1 parent
f9fa7cb
commit 30dd586
Showing
6 changed files
with
89 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Remove workflow labels once an issue is assigned | ||
on: | ||
issues: | ||
types: | ||
- assigned | ||
jobs: | ||
label_issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- run: gh issue edit "$NUMBER" --remove-label triage --remove-label next | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NUMBER: ${{ github.event.issue.number }} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Update roadmap issue #728 | ||
on: | ||
issues: | ||
types: | ||
- assigned | ||
- labeled | ||
workflow_dispatch: | ||
jobs: | ||
label_issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- run: update-workflow-issue | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
|
||
list_issues() { | ||
gh issue list "$@" --json number --jq 'map("- #\(.number)")[]' | sort -n | ||
} | ||
|
||
gh issue edit -F - 728 <<EOF | ||
<!-- This file is generated by scripts/update-workflow-issue. Do not edit manually. --> | ||
$( | ||
issues="$(list_issues --label urgent)" | ||
test -z "$issues" && exit 0 | ||
echo "### Urgent [👀](https://github.com/TBD54566975/ftl/issues?q=is%3Aissue+is%3Aopen+label%3Aurgent)" | ||
echo | ||
echo "> [!WARNING]" | ||
echo "> These issues are urgent and need immediate attention." | ||
echo "$issues" | ||
) | ||
### Current assigned issues | ||
$( | ||
gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /orgs/TBD54566975/teams/ftl-team/members | jq -r '.[].login' | grep -v dhanji | sort | while read -r member; do | ||
echo "@$member [👀](https://github.com/TBD54566975/ftl/issues/assigned/$member)" | ||
echo | ||
list_issues -a "$member" | ||
echo | ||
done | ||
) | ||
$( | ||
issues="$(list_issues --label triage)" | ||
test -z "$issues" && exit 0 | ||
echo "### Needs triage [👀](https://github.com/TBD54566975/ftl/issues?q=is%3Aissue+is%3Aopen+label%3Atriage)" | ||
echo | ||
echo "$issues" | ||
) | ||
### Next [👀](https://github.com/TBD54566975/ftl/issues?q=is%3Aissue+is%3Aopen+label%3Anext) | ||
$( | ||
issues="$(list_issues --label next)" | ||
if test -z "$issues"; then | ||
echo "> [!WARNING]" | ||
echo "> There are no issues labelled for upcoming work." | ||
exit 0 | ||
fi | ||
echo "$issues" | ||
) | ||
EOF |