Skip to content

Commit 90c2a11

Browse files
committed
open-pr: allow update-scripts to stage changes already
The current logic calls for the `update-scripts` to leave uncommitted changes. To be precise, it tests for _unstaged_ changes. If an `update-scripts/versions/*` script already staged changes and did not leave any unstaged changes around, the check would say: "<package> already at <version>". However, any new files need to be staged. Technically, we could stage them via `git add -N`, but that would be only for the sake of accommodating the current definition of the `open-pr` GitHub workflow, when that workflow is just as easily improved instead. So let's just enhance the check to look not only for unstaged changes, but also for staged-yet-uncommitted changes. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent d98d4f9 commit 90c2a11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/open-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
PKGBUILD
110110
fi &&
111111
git update-index -q --refresh &&
112-
if git diff-files --exit-code
112+
if git diff-files --exit-code && git diff-index --quiet HEAD --
113113
then
114114
echo "::notice::$PACKAGE_TO_UPGRADE already at $UPGRADE_TO_VERSION"
115115
exit 0

0 commit comments

Comments
 (0)