From 90c2a11692d773dcec6c4961cee87a7c9f86f7da Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 8 Jul 2024 23:34:42 +0200 Subject: [PATCH] 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: " already at ". 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 --- .github/workflows/open-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/open-pr.yml b/.github/workflows/open-pr.yml index 8bcc4cc8..bfe165a7 100644 --- a/.github/workflows/open-pr.yml +++ b/.github/workflows/open-pr.yml @@ -109,7 +109,7 @@ jobs: PKGBUILD fi && git update-index -q --refresh && - if git diff-files --exit-code + if git diff-files --exit-code && git diff-index --quiet HEAD -- then echo "::notice::$PACKAGE_TO_UPGRADE already at $UPGRADE_TO_VERSION" exit 0