From 4fdbbed4c171b2263f78f6cb43f4b22825ff2254 Mon Sep 17 00:00:00 2001 From: Arthur Araujo Date: Tue, 31 Oct 2023 20:06:07 -0300 Subject: [PATCH 1/2] Updating dependencies --- .github/workflows/ChangelogUpdater.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ChangelogUpdater.yml b/.github/workflows/ChangelogUpdater.yml index d3e29b2fe..5e593750f 100644 --- a/.github/workflows/ChangelogUpdater.yml +++ b/.github/workflows/ChangelogUpdater.yml @@ -9,14 +9,14 @@ jobs: steps: - name: Check trigger id: check - uses: khan/pull-request-comment-trigger@master + uses: khan/pull-request-comment-trigger@v1.1.0 with: trigger: '\changelog-update' reaction: rocket prefix_only: 'true' env: GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' - - uses: tibdex/github-app-token@v1 + - uses: tibdex/github-app-token@v2 id: generate-token with: app_id: ${{ secrets.APP_ID }} @@ -39,7 +39,7 @@ jobs: echo "COMMENT_AUTHOR_ASSOCIATION: $COMMENT_AUTHOR_ASSOCIATION" - name: Clone git repo if: steps.check.outputs.triggered == 'true' - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Configure Git Agent if: steps.check.outputs.triggered == 'true' run: | From 814994059f0e851b161ae635fcc16e613bd47277 Mon Sep 17 00:00:00 2001 From: Arthur Araujo Date: Tue, 31 Oct 2023 21:53:04 -0300 Subject: [PATCH 2/2] Fix #1027: Avoid update-changelog to generate an extra line when there are no changes --- scripts/update-changelog.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/update-changelog.py b/scripts/update-changelog.py index 7753d2499..ad951fb07 100644 --- a/scripts/update-changelog.py +++ b/scripts/update-changelog.py @@ -40,8 +40,9 @@ def get_updated_file_content(current_changelog_lines: str, new_change: any, new_ if line == g_end_changes: is_sourcing_changes = False new_file_content.extend(get_sorted_unique_entries(changes)) - # adds an extra item to avoid issues with the linter - new_file_content.append('') + # adds an extra item to avoid issues with the linter, but only if there is at least one entry + if new_file_content[-1] != '': + new_file_content.append('') if line == g_end_users: is_sourcing_users = False @@ -68,6 +69,7 @@ def get_updated_file_content(current_changelog_lines: str, new_change: any, new_ # Include on extra empty line to comply with markdown formatter new_file_content.append('') + return new_file_content def update_changelog(changelog_filename: str, new_change: any, new_user: any):