1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #10364 from pradyunsg/tweak-news-file

This commit is contained in:
Pradyun Gedam 2021-08-15 13:22:58 +01:00 committed by GitHub
commit f5c4a0911e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 13 deletions

View file

@ -1,13 +0,0 @@
on:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]
jobs:
check-news-file:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
# `towncrier check` needs enough history to run `git diff --name-only origin/main...`
fetch-depth: 0
- run: pipx run towncrier check --compare-with origin/main
if: ${{ ! (contains(github.event.pull_request.labels.*.name, 'trivial')) }}

25
.github/workflows/news-file.yml vendored Normal file
View file

@ -0,0 +1,25 @@
name: Check
on:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]
jobs:
check-news-entry:
name: news entry
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
# `towncrier check` runs `git diff --name-only origin/main...`, which
# needs a non-shallow clone.
fetch-depth: 0
- name: Check news entry
if: "!contains(github.event.pull_request.labels.*.name, 'trivial')"
run: |
if ! pipx run towncrier check --compare-with origin/${{ github.base_ref }}; then
echo "Please see https://pip.pypa.io/dev/news-entry-failure for guidance."
false
fi