Skip changelog check if label is present (#3687)

This commit is contained in:
Francisco
2022-09-07 17:13:18 -03:00
committed by GitHub
parent 3c552e6e03
commit 6a8d977d22
2 changed files with 28 additions and 13 deletions

28
.github/workflows/changelog.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: changelog
on:
pull_request:
types:
- opened
- synchronize
- labeled
- unlabeled
concurrency:
group: changelog-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-changelog') }}
steps:
- uses: actions/checkout@v3
- name: Check diff
run: |
git fetch origin ${{ github.base_ref }} --depth=1
if git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md ; then
echo 'Missing changelog entry'
exit 1
fi

View File

@ -13,19 +13,6 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
changelog:
if: github.event_name == 'pull_request' && github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check diff
run: |
git fetch origin ${{ github.base_ref }} --depth=1
if git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md ; then
echo 'Missing changelog entry'
exit 1
fi
lint: lint:
if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable' if: github.repository != 'OpenZeppelin/openzeppelin-contracts-upgradeable'
runs-on: ubuntu-latest runs-on: ubuntu-latest