Debian Codegraph @

.github/actions/get-release-notes/action.yml

raw symbols SCIP
1 name: Return the release notes extracted from the PR body
2
3 #
4 # Returns the release notes from the content of a pull request linked to a release branch. It expects the branch name to be in the format release/vX.Y.Z, release/X.Y.Z, release/vX.Y.Z-beta.N. etc.
5 #
6 # TODO: Remove once the common repo is public.
7 #
8 inputs:
9 version:
10 required: true
11 repo_name:
12 required: false
13 repo_owner:
14 required: true
15 token:
16 required: true
17
18 outputs:
19 release-notes:
20 value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }}
21
22 runs:
23 using: composite
24
25 steps:
26 - uses: actions/github-script@v7
27 id: get_release_notes
28 with:
29 result-encoding: string
30 script: |
31 const { data: pulls } = await github.rest.pulls.list({
32 owner: process.env.REPO_OWNER,
33 repo: process.env.REPO_NAME,
34 state: 'all',
35 head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`,
36 });
37 core.setOutput('RELEASE_NOTES', pulls[0].body);
38 env:
39 GITHUB_TOKEN: ${{ inputs.token }}
40 REPO_OWNER: ${{ inputs.repo_owner }}
41 REPO_NAME: ${{ inputs.repo_name }}
42 VERSION: ${{ inputs.version }}