Skip to content

Commit 1db87cd

Browse files
committed
Improve warning message if automated version increments cannot modify PR
and skip the comment creation step on the step level when no version increment is needed.
1 parent 1868711 commit 1db87cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/publishVersionCheckResults.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104

105105
- name: Add or update information comment
106106
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
107-
if: always()
107+
if: always() && steps.search-patch.outputs.result
108108
env:
109109
FILELIST: ${{ steps.git-commit.outputs.file-list }}
110110
with:
@@ -120,7 +120,7 @@ jobs:
120120
})
121121
const applyChangeMessagePart = pr.data.maintainer_can_modify
122122
? "An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the _git patch_."
123-
: ":warning: :construction: **This PR cannot be modified by maintainers** because edits are disabled or it is created from an organization repository. To obtain the required changes apply the _git patch_ manually as additional commit."
123+
: "> [!WARNING]\n> :construction: **This PR cannot be modified by maintainers** because edits are disabled or it is created from an organization repository. To obtain the required changes apply the _git patch_ manually as an additional commit."
124124
const commentBody = `
125125
${{ env.COMMENT_FIRST_LINE }}.
126126
Therefore the following files need a version increment:

0 commit comments

Comments
 (0)