-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.11 KB
/
open_pr.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
31
32
33
34
35
36
37
38
name: Generate PR description
on:
pull_request_target:
types: [opened]
jobs:
generate-pr-description:
runs-on: ubuntu-latest
steps:
- name: Generate PR description for this PR and update the PR web page
uses: vblagoje/pr-auto@v1
id: pr-auto-step
with:
system_prompt: https://bit.ly/pr_auto
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
- name: Update PR description
uses: vblagoje/update-pr@v1
with:
pr-body: ${{steps.pr-auto-step.outputs.pr-text}}
set-reno-condition:
runs-on: ubuntu-latest
outputs:
generate-release-note: ${{ steps.set-output.outputs.generate-release-note }}
steps:
- name: Set generate-release-note output
id: set-output
run: |
labels=$(jq -r '.pull_request.labels[].name' <<<"$GITHUB_EVENT")
if echo "$labels" | grep -q "ignore-for-release-notes"; then
echo "::set-output name=generate-release-note::false"
else
echo "::set-output name=generate-release-note::true"
fi
env:
GITHUB_EVENT: ${{ toJson(github.event) }}