-
Notifications
You must be signed in to change notification settings - Fork 45
38 lines (33 loc) · 1015 Bytes
/
handle-pr-labels.yml
File metadata and controls
38 lines (33 loc) · 1015 Bytes
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
name: Handle PR-Labels
on:
pull_request_target:
types: [labeled]
concurrency:
group: workflow-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
handle-labels:
if: >-
github.repository == 'public-ui/kolibri' &&
github.event.action == 'labeled' &&
github.event.label.name == 'codex'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo } = context.repo;
const prNumber = context.payload.pull_request.number;
await github.rest.issues.addLabels({
owner,
repo,
issue_number: prNumber,
labels: ['agent:codex'],
});
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: prNumber,
name: 'codex',
});