File: action.yml

package info (click to toggle)
auth0-python 4.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,280 kB
  • sloc: python: 8,933; makefile: 15; sh: 2
file content (42 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download
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
40
41
42
name: Return the release notes extracted from the PR body

#
# 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.
#
# TODO: Remove once the common repo is public.
#
inputs:
  version:
    required: true
  repo_name:
    required: false
  repo_owner:
    required: true
  token:
    required: true

outputs:
  release-notes:
    value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }}

runs:
  using: composite

  steps:
    - uses: actions/github-script@v7
      id: get_release_notes
      with:
        result-encoding: string
        script: |
          const { data: pulls } = await github.rest.pulls.list({
            owner: process.env.REPO_OWNER,
            repo: process.env.REPO_NAME,
            state: 'all',
            head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`,
          });
          core.setOutput('RELEASE_NOTES', pulls[0].body);
      env:
        GITHUB_TOKEN: ${{ inputs.token }}
        REPO_OWNER: ${{ inputs.repo_owner }}
        REPO_NAME: ${{ inputs.repo_name }}
        VERSION: ${{ inputs.version }}