diff --git a/.github/workflows/check_release_notes.yml b/.github/workflows/check_release_notes.yml new file mode 100644 index 00000000000..c500454f8ef --- /dev/null +++ b/.github/workflows/check_release_notes.yml @@ -0,0 +1,27 @@ +name: Check release notes +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + branches: + - 'main' + - 'release/*' +jobs: + check_release_notes: + permissions: + issues: write + pull-requests: write + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + runs-on: ubuntu-latest + steps: + - name: Get github ref + uses: actions/github-script@v3 + id: get-pr + with: + script: | + const result = await github.pulls.get({ + pull_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + }); + return { "pr_number": context.issue.number, "ref": result.data.head.ref, "repository": result.data.head.repo.full_name};