-
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 882 Bytes
/
pr-assign.yml
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
name: Assign PR to author
run-name: Assign PR Author ${{ (vars.RUNS_ON_SELF_HOSTED == null && '(on GitHub-hosted)') || '(on self-hosted)' }}
on:
pull_request:
types: opened
jobs:
pr-assign:
runs-on: ${{ (vars.RUNS_ON_SELF_HOSTED == null && 'ubuntu-latest') || 'self-hosted' }}
permissions:
contents: read
pull-requests: write
repository-projects: read
if: ${{ !contains(github.actor, '[bot]') }}
timeout-minutes: 30
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APPS_APP_ID }}
private-key: ${{ secrets.APPS_PRIVATE_KEY }}
- env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: >
gh pr edit ${{ github.event.number }}
--add-assignee ${{ github.actor }}
--repo ${{ github.repository }}