From 434835a53ee1b86b1498a6cb7f5235a51c3c440f Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 4 Sep 2024 09:01:35 +0200 Subject: [PATCH] ci: drop our custom Towncrier task The Chronographer does the same thing more generic way. The only missing part was to configure the hint that should point our users to the Release-Notes-Next documentation page, and it is done now. --- .github/chronographer.yml | 3 ++ .github/workflows/towncrier.yml | 53 --------------------------------- 2 files changed, 3 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/towncrier.yml diff --git a/.github/chronographer.yml b/.github/chronographer.yml index 8a635bf87..a7e37bf27 100644 --- a/.github/chronographer.yml +++ b/.github/chronographer.yml @@ -3,3 +3,6 @@ labels: fragment-provided: ~ # opt out skip-changelog: no-release-notes + +action-hints: + external-docs-url: hhttps://rpm-software-management.github.io/mock/Release-Notes-New-Entry diff --git a/.github/workflows/towncrier.yml b/.github/workflows/towncrier.yml deleted file mode 100644 index 2674d623a..000000000 --- a/.github/workflows/towncrier.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -name: Check that ChangeLog has been modified - -on: - pull_request: - branches: - - main - -jobs: - changed_files: - runs-on: ubuntu-latest - name: Test that towncrier file exists - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v45 - - - name: Detect the missing Release Notes entry - env: - ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO_NAME: ${{ github.event.repository.name }} - PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} - run: | - labels="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" - status=false - - case $labels in - *no-release-notes*) - echo "No release notes entry expected." - exit 0 - ;; - esac - - for file in ${ALL_CHANGED_FILES}; do - case $file in - *release-notes-next*) - status=true - ;; - esac - done - if $status; then - echo "Thank you for providing the release note snippet!" - else - echo "Please provide a release notes snippet, per the instructions" - echo https://rpm-software-management.github.io/mock/Release-Notes-New-Entry - fi - $status