Skip to content

Firefly III: a personal finances manager

new command

James Cole62c4d0cf8665
diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml
index b458fb0489..e4280b3b4b 100644
--- a/.github/workflows/cleanup.yml
+++ b/.github/workflows/cleanup.yml
@@ -56,6 +56,7 @@ jobs:
const workflows = [
'cleanup.yml',
+ 'close-duplicates.yml',
'closed-issues.yml',
'debug-info-actions.yml',
'depsreview.yml',
diff --git a/.github/workflows/close-duplicates.yml b/.github/workflows/close-duplicates.yml
new file mode 100644
index 0000000000..a505942c64
--- /dev/null
+++ b/.github/workflows/close-duplicates.yml
@@ -0,0 +1,25 @@
+name: "Issues - Command to close duplicate issues"
+
+# the workflow to execute on is comments that are newly created
+on:
+ issue_comment:
+ types: [created]
+
+permissions:
+ issues: write
+ checks: read
+
+jobs:
+ close_duplicates:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: github/[email protected]
+ id: command
+ with:
+ command: ".duplicate"
+ - name: reply
+ if: ${{ steps.command.outputs.continue == 'true' }}
+ run: |
+ gh issue comment "$NUMBER" --body "Hi there!\n\nThis is an automatic reply. `Share and enjoy`.\n\nThis issue is probably a duplicate of #${{ steps.command.outputs.params }}. Please refer to that issue for support.\n\nThank you for your contribution."
+ gh issue close "$NUMBER" --reason completed
+ gh issue lock "$NUMBER"