-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathfeature-branch-description.yml
More file actions
39 lines (36 loc) · 1.14 KB
/
feature-branch-description.yml
File metadata and controls
39 lines (36 loc) · 1.14 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 Description
# Only generates descriptions for PRs targeting specific branches
name: Describe Feature PRs
on:
pull_request:
types: [opened, synchronize]
branches:
- main
- develop
- release/*
jobs:
describe:
# 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 Description
uses: augmentcode/describe-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-described']
})