Skip to content

Commit

Permalink
chore(ci): fix the changelog check (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev authored Jan 7, 2025
1 parent 11050fe commit 5159908
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 63 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Check Changelog"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- uses: bcoe/conventional-release-labels@886f696738527c7be444262c327c89436dfb95a8 # 1.3.1
with:
type_labels: '{"feat": "feat", "fix": "fix", "breaking": "breaking", "chore": "no release notes" }'
ignored_types: "[]"
- name: Check Changelog
uses: dangoslen/changelog-enforcer@204e7d3ef26579f4cd0fd759c57032656fdf23c7 # 3.6.1
with:
skipLabels: no release notes
missingUpdateErrorMessage: Please add an entry in CHANGELOG.md or apply the 'no release notes' label to skip this check.
63 changes: 0 additions & 63 deletions .github/workflows/quality-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,69 +13,6 @@ permissions:
checks: write

jobs:
changelog-check:
name: "Changelog Check"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: remove label not matching title - fix
if: |
startsWith(github.event.pull_request.title, 'fix:') ||
startsWith(github.event.pull_request.title, 'fix(')
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # 1.3.0
with:
labels: feat

- name: remove label not matching title - feat
if: |
startsWith(github.event.pull_request.title, 'feat:') ||
startsWith(github.event.pull_request.title, 'feat(')
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # 1.3.0
with:
labels: fix

- name: add label based on title - fix
if: |
startsWith(github.event.pull_request.title, 'fix:') ||
startsWith(github.event.pull_request.title, 'fix(')
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8 # 1.1.0
with:
labels: fix
github_token: ${{ github.token }}

- name: add label based on title - feat
if: |
startsWith(github.event.pull_request.title, 'feat:') ||
startsWith(github.event.pull_request.title, 'feat(')
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8 # 1.1.0
with:
labels: feature
github_token: ${{ github.token }}

- name: add label based on title - chore
if: |
startsWith(github.event.pull_request.title, 'chore:') ||
startsWith(github.event.pull_request.title, 'chore(')
uses: actions-ecosystem/action-add-labels@bd52874380e3909a1ac983768df6976535ece7f8 # 1.1.0
with:
labels: no release notes
github_token: ${{ github.token }}

- name: Verify Changed files
uses: tj-actions/verify-changed-files@6ed7632824d235029086612d4330d659005af687 # 20.0.1
id: verify-changelog-files
with:
files: |
CHANGELOG.md
- uses: mheap/github-action-required-labels@5847eef68201219cf0a4643ea7be61e77837bbce # 5.4.1
if: steps.verify-changed-files.outputs.files_changed == 'false'
with:
mode: minimum
count: 1
labels: "no release notes"

catalog-check:
name: "Catalog Updates Check"
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5159908

Please sign in to comment.