-
Notifications
You must be signed in to change notification settings - Fork 137
47 lines (38 loc) · 1.34 KB
/
changelog.yaml
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
43
44
45
46
47
# SPDX-License-Identifier: MIT
name: changelog entry
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled, reopened]
branches:
- master
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-changelog-entry:
name: Check for changelog entry
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'skip news') != true
steps:
- uses: actions/checkout@v4
with:
# towncrier needs a non-shallow clone
fetch-depth: '0'
- name: Set up environment
uses: ./.github/actions/setup-env
with:
python-version: '3.9'
- name: Install dependencies
run: pdm install -dG changelog
- name: Check for presence of a Change Log fragment (only pull requests)
# NOTE: The pull request' base branch needs to be fetched so towncrier
# is able to compare the current branch with the base branch.
run: |
if ! pdm run towncrier check --compare-with origin/${BASE_BRANCH}; then
echo "::error::Please see https://github.com/DisnakeDev/disnake/blob/master/changelog/README.rst for details on how to create a changelog entry." >&2
exit 1
fi
env:
BASE_BRANCH: ${{ github.base_ref }}