From 9448402d9f784b76227de33e9e88579e635acee4 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 10 Nov 2025 09:00:33 +0100 Subject: [PATCH 1/4] Update issues-reply-old-versions.yml Signed-off-by: James Cole --- .github/workflows/issues-reply-old-versions.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/issues-reply-old-versions.yml b/.github/workflows/issues-reply-old-versions.yml index 6006842a7e..b867e51e70 100644 --- a/.github/workflows/issues-reply-old-versions.yml +++ b/.github/workflows/issues-reply-old-versions.yml @@ -31,6 +31,15 @@ jobs: excludes: prerelease, draft token: ${{ secrets.GITHUB_TOKEN }} - run: | + # sure this can be done in a single step but still. + FFNOV="${{ steps.ff3version.outputs.release }}" + FFNOV="${FFNOV:1}" + + DDNOV="${{ steps.importerversion.outputs.release }}" + DDNOV="${DDNOV:1}" + + echo "Version is ${{ steps.ff3version.outputs.release }}, without v is $FFNOV" + ISSUE_BODY=$(gh issue view $NUMBER --json body) if [[ $ISSUE_BODY == *"MZ2udTpin6FL"* && $ISSUE_BODY != *${{ steps.ff3version.outputs.release }}* && $ISSUE_BODY != *${{ steps.importerversion.outputs.release }}* ]]; then From b54d7d5c7bbc1cd8fa83238992127215ada46843 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 10 Nov 2025 09:02:57 +0100 Subject: [PATCH 2/4] Enhance issue reply condition for old versions Updated condition to check for additional version variables in issue body. Signed-off-by: James Cole --- .github/workflows/issues-reply-old-versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issues-reply-old-versions.yml b/.github/workflows/issues-reply-old-versions.yml index b867e51e70..3491431461 100644 --- a/.github/workflows/issues-reply-old-versions.yml +++ b/.github/workflows/issues-reply-old-versions.yml @@ -41,7 +41,7 @@ jobs: echo "Version is ${{ steps.ff3version.outputs.release }}, without v is $FFNOV" ISSUE_BODY=$(gh issue view $NUMBER --json body) - if [[ $ISSUE_BODY == *"MZ2udTpin6FL"* && $ISSUE_BODY != *${{ steps.ff3version.outputs.release }}* && $ISSUE_BODY != *${{ steps.importerversion.outputs.release }}* ]]; then + if [[ $ISSUE_BODY == *"MZ2udTpin6FL"* && $ISSUE_BODY != *${{ steps.ff3version.outputs.release }}* && $ISSUE_BODY != *${{ steps.importerversion.outputs.release }}* && $ISSUE_BODY != *$FFNOV* && $ISSUE_BODY != *$DDNOV* ]]; then MESSAGE="Hi there! From 122a389a953a1a532f102505385989b126379084 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 10 Nov 2025 14:40:41 +0100 Subject: [PATCH 3/4] Fix typo in automated reply message Signed-off-by: James Cole --- .github/workflows/issues-reply-old-versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issues-reply-old-versions.yml b/.github/workflows/issues-reply-old-versions.yml index 3491431461..5bb9362a57 100644 --- a/.github/workflows/issues-reply-old-versions.yml +++ b/.github/workflows/issues-reply-old-versions.yml @@ -49,7 +49,7 @@ jobs: You triggered an automated reply, because it looks like you're not running Firefly III version **${{ steps.ff3version.outputs.release }}** or version **${{ steps.importerversion.outputs.release }}** of the data importer. - Please be so kind as to include the output from the \`/debug\`-page, if you have not done so already. If you already included the debug information, plase make sure to upgrade to the latest version of Firefly III (or the data importer) *first*. This may already solve your issue. + Please be so kind as to include the output from the \`/debug\`-page, if you have not done so already. If you already included the debug information, please make sure to upgrade to the latest version of Firefly III (or the data importer) *first*. This may already solve your issue. If you are running the latest version, and this message is wrong, my apologies for the intrusion." gh issue comment "$NUMBER" --body "$MESSAGE" From abfa2af278f54dea64ae248f7779bf0943f5b2c1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 11 Nov 2025 06:16:36 +0100 Subject: [PATCH 4/4] Expand tests. --- .../workflows/issues-reply-old-versions.yml | 47 +++++++++++++++++-- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/.github/workflows/issues-reply-old-versions.yml b/.github/workflows/issues-reply-old-versions.yml index 5bb9362a57..4fe3f005eb 100644 --- a/.github/workflows/issues-reply-old-versions.yml +++ b/.github/workflows/issues-reply-old-versions.yml @@ -31,6 +31,8 @@ jobs: excludes: prerelease, draft token: ${{ secrets.GITHUB_TOKEN }} - run: | + ISSUE_BODY=$(gh issue view $NUMBER --json body) + # sure this can be done in a single step but still. FFNOV="${{ steps.ff3version.outputs.release }}" FFNOV="${FFNOV:1}" @@ -38,10 +40,26 @@ jobs: DDNOV="${{ steps.importerversion.outputs.release }}" DDNOV="${DDNOV:1}" - echo "Version is ${{ steps.ff3version.outputs.release }}, without v is $FFNOV" + echo "Firefly III version is ${{ steps.ff3version.outputs.release }}, without v is $FFNOV" + echo "Data importer version is ${{ steps.ff3version.outputs.release }}, without v is $FFNOV" + + # first test: no debug info OR old version for issue type BUG + if [[ $ISSUE_BODY == *"MZ2udTpin6FL"* && $ISSUE_BODY != *"Debug information generated at"* ]]; then + MESSAGE="Hi there! - ISSUE_BODY=$(gh issue view $NUMBER --json body) - if [[ $ISSUE_BODY == *"MZ2udTpin6FL"* && $ISSUE_BODY != *${{ steps.ff3version.outputs.release }}* && $ISSUE_BODY != *${{ steps.importerversion.outputs.release }}* && $ISSUE_BODY != *$FFNOV* && $ISSUE_BODY != *$DDNOV* ]]; then + This is an automated reply. \`Share and enjoy\` + + You triggered an automated reply, because it looks like you didn't include the output from the `/debug` page. Would you be so kind as to do that? It helps the developers debug your issue more easily. + + If you did include debug information, and this message is wrong, my apologies for the intrusion." + + gh issue comment "$NUMBER" --body "$MESSAGE" + echo "Triggered on first test" + exit 0 + fi + + # second test: no debug info + old version for issue type BUG + if [[ $ISSUE_BODY == *"MZ2udTpin6FL"* && $ISSUE_BODY != *"Debug information generated at"* && $ISSUE_BODY != *${{ steps.ff3version.outputs.release }}* && $ISSUE_BODY != *${{ steps.importerversion.outputs.release }}* && $ISSUE_BODY != *$FFNOV* && $ISSUE_BODY != *$DDNOV* ]]; then MESSAGE="Hi there! @@ -51,8 +69,29 @@ jobs: Please be so kind as to include the output from the \`/debug\`-page, if you have not done so already. If you already included the debug information, please make sure to upgrade to the latest version of Firefly III (or the data importer) *first*. This may already solve your issue. - If you are running the latest version, and this message is wrong, my apologies for the intrusion." + If you *are* running the latest version, and this message is wrong, my apologies for the intrusion." + gh issue comment "$NUMBER" --body "$MESSAGE" + echo "Triggered on second test" + exit 0 + fi + + # third test: debug info but old version + if [[ $ISSUE_BODY == *"MZ2udTpin6FL"* && $ISSUE_BODY == *"Debug information generated at"* && $ISSUE_BODY != *${{ steps.ff3version.outputs.release }}* && $ISSUE_BODY != *${{ steps.importerversion.outputs.release }}* && $ISSUE_BODY != *$FFNOV* && $ISSUE_BODY != *$DDNOV* ]]; then + + MESSAGE="Hi there! + + This is an automated reply. \`Share and enjoy\` + + You triggered an automated reply, because it looks like you're not running Firefly III version **${{ steps.ff3version.outputs.release }}** or version **${{ steps.importerversion.outputs.release }}** of the data importer. + + Please make sure to upgrade to the latest version of Firefly III (or the data importer) *first*. This may already solve your issue. + + If you are running the latest version, and this message is wrong, my apologies for the intrusion." + + gh issue comment "$NUMBER" --body "$MESSAGE" + echo "Triggered on third test" + exit 0 fi env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}