From db7cafe51b618a46002d45b1a428a0bc5ab15846 Mon Sep 17 00:00:00 2001 From: Anoushka Jha <95405559+BabyElias@users.noreply.github.com> Date: Mon, 11 Dec 2023 21:54:11 +0530 Subject: [PATCH 1/3] Added custom implementation of GH Action --- .github/workflows/changelog.yml | 53 ++++++++++++++++++++------------- CHANGELOG.md | 10 +++++++ 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index d99db87ba..f951438ee 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,23 +1,34 @@ -name: Changelog is updated - -on: [pull_request] - -permissions: - pull-requests: read - +name: Check Changelog.md +on: + pull_request: + types: [opened, synchronize, reopened] jobs: check-changelog: - runs-on: ubuntu-latest - steps: - - uses: ankitjain28may/list-files-in-pr@v1.0 - id: list-files - with: - githubToken: ${{ github.token }} - outputFormat: 'space-delimited' - - run: | - for file in ${{ steps.list-files.outputs.pullRequestFiles }}; do - if [ $file = "CHANGELOG.md" ]; then - exit 0 - fi - done - exit 1 + runs-on: ubuntu-latest + permissions: write-all + steps: + - uses: actions/checkout@v2 + - name: Fetch changed files + id: fetch-changed-files + run: | + response=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + repos/${owner}/${REPO}/pulls/${PULL_NUMBER}/files) + echo "$response" | jq '.' > response.json + + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + owner: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + PULL_NUMBER: ${{ github.event.pull_request.number }} + - name: Check if Changelog.md is changed + run: | + if [[ $(jq '.[].filename' response.json) == *"CHANGELOG.md"* ]]; then + echo "Changelog.md is changed" + exit 0 + else + echo "Changelog.md is not changed" + exit 1 + fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 28831c346..ec1f24e6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ Changelog is rather internal in nature. See release notes for the public overview and guidelines. Releases are recorded as git tags in the [Github releases](https://github.com/learningequality/kolibri-design-system/releases) page. ## Upcoming version +- [#504] + - **Description:** Added custom implementation of GH action that checks that changelog is updated in each pull request + - **Products impact:** + - **Addresses:** - + - **Components:** - + - **Breaking:** + - **Impacts a11y:** + - **Guidance:** - + +[#504]: https://github.com/learningequality/kolibri-design-system/pull/504 - [#500] - **Description:** Upgrades vue-router dependency From edddd5090c9bd32593395093b118e12ba2a5651e Mon Sep 17 00:00:00 2001 From: Anoushka Jha <95405559+BabyElias@users.noreply.github.com> Date: Mon, 11 Dec 2023 21:59:16 +0530 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec1f24e6f..42510faca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Changelog is rather internal in nature. See release notes for the public overview and guidelines. Releases are recorded as git tags in the [Github releases](https://github.com/learningequality/kolibri-design-system/releases) page. ## Upcoming version -- [#504] +- [#505] - **Description:** Added custom implementation of GH action that checks that changelog is updated in each pull request - **Products impact:** - **Addresses:** - @@ -12,7 +12,7 @@ Changelog is rather internal in nature. See release notes for the public overvie - **Impacts a11y:** - **Guidance:** - -[#504]: https://github.com/learningequality/kolibri-design-system/pull/504 +[#505]: https://github.com/learningequality/kolibri-design-system/pull/505 - [#500] - **Description:** Upgrades vue-router dependency From aadf88c4bc27ac3e2c412a0129cfc054850cfb79 Mon Sep 17 00:00:00 2001 From: MisRob Date: Wed, 13 Dec 2023 14:28:11 +0100 Subject: [PATCH 3/3] Tiny changelog format tweak --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42510faca..896381aba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,11 @@ Changelog is rather internal in nature. See release notes for the public overview and guidelines. Releases are recorded as git tags in the [Github releases](https://github.com/learningequality/kolibri-design-system/releases) page. ## Upcoming version + - [#505] - **Description:** Added custom implementation of GH action that checks that changelog is updated in each pull request - - **Products impact:** - - **Addresses:** - + - **Products impact:** none + - **Addresses:** https://github.com/learningequality/kolibri-design-system/issues/481 - **Components:** - - **Breaking:** - **Impacts a11y:**