-
-
Notifications
You must be signed in to change notification settings - Fork 18
51 lines (47 loc) · 1.44 KB
/
Copy pathautoassign.yml
File metadata and controls
51 lines (47 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Issue and PR assignment
on:
issues:
types: [opened]
pull_request:
types: [opened]
schedule:
- cron: '0 */6 * * *'
workflow_dispatch: {}
jobs:
auto-assign-issue:
if: github.event_name == 'issues'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: 'Auto-assign issue'
uses: pozil/auto-assign-issue@v4.0.1
with:
assignees: modem7
auto-assign-pr:
if: github.event_name == 'pull_request' && github.actor != 'renovate[bot]'
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
steps:
- name: 'Auto-assign PR'
uses: pozil/auto-assign-issue@v4.0.1
with:
assignees: modem7
auto-assign-stale-renovate-pr:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: 'Assign Renovate PRs still open after automerge would have kicked in'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr list --repo "$GITHUB_REPOSITORY" --author "renovate[bot]" --state open \
--json number,assignees --jq '.[] | select(.assignees | length == 0) | .number' |
while read -r pr; do
echo "Assigning modem7 to PR #$pr"
gh pr edit "$pr" --repo "$GITHUB_REPOSITORY" --add-assignee modem7
done