Skip to content

Issue and PR assignment #19

Issue and PR assignment

Issue and PR assignment #19

Workflow file for this run

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