-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathfeature-branch-review.yml
More file actions
39 lines (36 loc) · 1.1 KB
/
feature-branch-review.yml
File metadata and controls
39 lines (36 loc) · 1.1 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
# Feature Branch PR Reviews
# Only reviews PRs targeting specific branches
name: Review Feature PRs
on:
pull_request:
types: [opened, synchronize]
branches:
- main
- develop
- release/*
jobs:
review:
# Only run for PRs from feature branches
if: startsWith(github.head_ref, 'feature/') || startsWith(github.head_ref, 'feat/')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Generate PR Review
uses: augmentcode/review-pr@v0
with:
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
github_token: ${{ secrets.GITHUB_TOKEN }}
pull_number: ${{ github.event.pull_request.number }}
repo_name: ${{ github.repository }}
- name: Add feature label
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['feature', 'auto-reviewed']
})