Skip to content

Commit db13f26

Browse files
authored
ci: assign renovate PRs that don't self-merge to modem7 (#22)
Assigns unmerged Renovate PRs to modem7 on a schedule instead of at open time, so PRs that automerge (patch/digest CI-plumbing bumps) don't generate noise, while ones that need manual review/merge still get surfaced.
1 parent 987c5e7 commit db13f26

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/autoassign.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
types: [opened]
66
pull_request:
77
types: [opened]
8+
schedule:
9+
- cron: '0 */6 * * *'
810

911
jobs:
1012
auto-assign-issue:
@@ -29,3 +31,20 @@ jobs:
2931
uses: pozil/auto-assign-issue@v4.0.1
3032
with:
3133
assignees: modem7
34+
35+
auto-assign-stale-renovate-pr:
36+
if: github.event_name == 'schedule'
37+
runs-on: ubuntu-latest
38+
permissions:
39+
pull-requests: write
40+
steps:
41+
- name: 'Assign Renovate PRs still open after automerge would have kicked in'
42+
env:
43+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: |
45+
gh pr list --repo "$GITHUB_REPOSITORY" --author "renovate[bot]" --state open \
46+
--json number,assignees --jq '.[] | select(.assignees | length == 0) | .number' |
47+
while read -r pr; do
48+
echo "Assigning modem7 to PR #$pr"
49+
gh pr edit "$pr" --repo "$GITHUB_REPOSITORY" --add-assignee modem7
50+
done

0 commit comments

Comments
 (0)