forked from DataDog/integrations-core
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (25 loc) · 1.01 KB
/
changelog-label-check.yml
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
name: Changelog label check
on:
pull_request:
types: [labeled, unlabeled]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Check changelog label
run: python .github/workflows/changelog-label-check.py
- name: Comment
if: ${{ github.event.action == 'labeled' && contains( github.event.pull_request.labels.*.name, 'changelog/Changed') }}
uses: actions/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
github.issues.createComment({ issue_number, owner, repo, body: "Label `changelog/Changed` was added to this Pull Request, so the next release will bump major version. Please make sure this is a breaking change, or use the `changelog/Fixed` label." });