name: Lint the changelog on: pull_request: types: [opened, synchronize, reopened, edited] jobs: lint-changelog: runs-on: ubuntu-latest steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.7.0 with: access_token: ${{ github.token }} - name: Check out repository code uses: actions/checkout@v2 if: github.event.pull_request.user.login != 'renovate[bot]' - name: skip-workflow id: skip-workflow uses: saulmaldonado/skip-workflow@v1.1.0 with: phrase: /no changelog/i github-token: ${{ secrets.GITHUB_TOKEN }} pr-message: 'body' search: '["pull_request"]' - name: Check for changelog entry if: github.event.pull_request.user.login != 'renovate[bot]' && !steps.skip-workflow.outputs.skip env: PR_NUMBER: ${{github.event.number}} run: bin/ci/lint-changelog.sh shell: bash - name: Add a reminder label to the PR uses: ./.github/actions/pr-labeler if: github.event.pull_request.user.login != 'renovate[bot]' && always() with: access_token: ${{ github.token }} label: ${{ env.label || 'needs changelog entry' }} action: ${{ env.label_action || 'remove' }}