From 2f8547869f9e2a4db1013e984313a7f20d301598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 09:38:31 +0200 Subject: [PATCH 01/31] chore: Let users decide for the title in error reporter --- lib/utils/error_reporter.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/utils/error_reporter.dart b/lib/utils/error_reporter.dart index 7690e4370..95511a9e2 100644 --- a/lib/utils/error_reporter.dart +++ b/lib/utils/error_reporter.dart @@ -49,10 +49,7 @@ class ErrorReporter { onPressed: () => launchUrl( AppConfig.newIssueUrl.resolveUri( Uri( - queryParameters: { - 'template': 'bug_report.yaml', - 'title': '[BUG]: ${message ?? error.toString()}', - }, + queryParameters: {'template': 'bug_report.yaml'}, ), ), mode: LaunchMode.externalApplication, From d4332d5705a6faf5cee7c5497a1be1c37d3e0e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 09:38:47 +0200 Subject: [PATCH 02/31] ci: Experimental check for duplicate workflow --- .github/workflows/check_duplicates.yaml | 30 +++++++++++++++++++++++++ lib/utils/error_reporter.dart | 4 +--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/check_duplicates.yaml diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml new file mode 100644 index 000000000..2d38d99bd --- /dev/null +++ b/.github/workflows/check_duplicates.yaml @@ -0,0 +1,30 @@ +name: Check Duplicates + +on: + issue: + types: [opened] + +jobs: + check_duplicates: + runs-on: ubuntu-latest + steps: + - name: Search for similar issues + run: echo "ISSUES=$(gh issue list --search '${{ github.event.issue.title }}' --json title,body | jq '[.[] | {title, body: (.body[:200])}]')" + - name: Send message to GPT + if: "${{ env.ISSUES != '[]' }}" + run: | + curl -X POST \ + https://api.openai.com/v1/chat/completions \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer ${{ secrets.OPENAI_KEY }}" \ + -d '{ + "model": "gpt-3.5-turbo", + "messages": [ + {"role": "user", "content": "Please link possible duplications of this issue."}, + {"role": "user", "content": "${{ github.event.issue.title }}\n${{ github.event.issue.body }}"}, + {"role": "user", "content": "${{ env.ISSUES }}"} + ], + "temperature": 0.7 + }' + env: + OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file diff --git a/lib/utils/error_reporter.dart b/lib/utils/error_reporter.dart index 95511a9e2..f4b5bce3b 100644 --- a/lib/utils/error_reporter.dart +++ b/lib/utils/error_reporter.dart @@ -48,9 +48,7 @@ class ErrorReporter { AdaptiveDialogAction( onPressed: () => launchUrl( AppConfig.newIssueUrl.resolveUri( - Uri( - queryParameters: {'template': 'bug_report.yaml'}, - ), + Uri(queryParameters: {'template': 'bug_report.yaml'}), ), mode: LaunchMode.externalApplication, ), From 417d162cdbe7bf8b120fc229f516b5479545e072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 09:42:58 +0200 Subject: [PATCH 03/31] ci: Fix experimental duplicate job --- .github/workflows/check_duplicates.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 2d38d99bd..f604a0a2b 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Search for similar issues - run: echo "ISSUES=$(gh issue list --search '${{ github.event.issue.title }}' --json title,body | jq '[.[] | {title, body: (.body[:200])}]')" + run: echo "ISSUES=$(gh issue list --search '${{ github.event.issue.title }}' --json title,body | jq '[.[] | {title, body: (.body[:200])}]')" >> $GITHUB_ENV - name: Send message to GPT if: "${{ env.ISSUES != '[]' }}" run: | From 0c8639e3fba25cc136f5d5cbd5e0ee092500aa0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 09:50:19 +0200 Subject: [PATCH 04/31] ci: Fix check duplicates workflow --- .github/workflows/check_duplicates.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index f604a0a2b..dc349b5c0 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -7,9 +7,12 @@ on: jobs: check_duplicates: runs-on: ubuntu-latest + env: + title: ${{ github.event.issue.title }} + body: ${{ github.event.issue.title }} steps: - name: Search for similar issues - run: echo "ISSUES=$(gh issue list --search '${{ github.event.issue.title }}' --json title,body | jq '[.[] | {title, body: (.body[:200])}]')" >> $GITHUB_ENV + run: echo "ISSUES=$(gh issue list --search '${{ env.title }}' --json title,body)" >> $GITHUB_ENV - name: Send message to GPT if: "${{ env.ISSUES != '[]' }}" run: | @@ -21,7 +24,7 @@ jobs: "model": "gpt-3.5-turbo", "messages": [ {"role": "user", "content": "Please link possible duplications of this issue."}, - {"role": "user", "content": "${{ github.event.issue.title }}\n${{ github.event.issue.body }}"}, + {"role": "user", "content": "${{ env.title }}\n${{ env.body }}"}, {"role": "user", "content": "${{ env.ISSUES }}"} ], "temperature": 0.7 From 415b7c4c5c91ba846bcf465c8bd754c407b18c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 09:52:45 +0200 Subject: [PATCH 05/31] ci: Fix duplicates workflow --- .github/workflows/check_duplicates.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index dc349b5c0..3da6be914 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -12,9 +12,8 @@ jobs: body: ${{ github.event.issue.title }} steps: - name: Search for similar issues - run: echo "ISSUES=$(gh issue list --search '${{ env.title }}' --json title,body)" >> $GITHUB_ENV + run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV - name: Send message to GPT - if: "${{ env.ISSUES != '[]' }}" run: | curl -X POST \ https://api.openai.com/v1/chat/completions \ @@ -25,7 +24,7 @@ jobs: "messages": [ {"role": "user", "content": "Please link possible duplications of this issue."}, {"role": "user", "content": "${{ env.title }}\n${{ env.body }}"}, - {"role": "user", "content": "${{ env.ISSUES }}"} + {"role": "user", "content": "${{ env.issues }}"} ], "temperature": 0.7 }' From 0ee3641fc01b123483083c17552a59806e83c924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 09:54:27 +0200 Subject: [PATCH 06/31] ci: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 3da6be914..6cd7be5a2 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -1,7 +1,7 @@ name: Check Duplicates on: - issue: + issues: types: [opened] jobs: From 2ff3a3b58771912dfb474439d2cf6c7b53f80860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:10:12 +0200 Subject: [PATCH 07/31] ci: Use Gemini instead of openai --- .github/workflows/check_duplicates.yaml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 6cd7be5a2..f30bc034f 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -15,18 +15,17 @@ jobs: run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV - name: Send message to GPT run: | - curl -X POST \ - https://api.openai.com/v1/chat/completions \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer ${{ secrets.OPENAI_KEY }}" \ + curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ + -H 'Content-Type: application/json' \ + -X POST \ -d '{ - "model": "gpt-3.5-turbo", - "messages": [ - {"role": "user", "content": "Please link possible duplications of this issue."}, - {"role": "user", "content": "${{ env.title }}\n${{ env.body }}"}, - {"role": "user", "content": "${{ env.issues }}"} - ], - "temperature": 0.7 - }' + "contents": [{ + "parts":[ + {"text": "Please write a very short and nice response to this new issue and link possible duplications."}, + {"text": "${{ env.title }}\n${{ env.body }}"}, + {"text": "${{ env.issues }}"} + ] + }] + }' env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file From ab0c06ec1f799216645ddf76dd2fe871e93aade8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:16:08 +0200 Subject: [PATCH 08/31] chore: Follow up find duplications workflow --- .github/workflows/check_duplicates.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index f30bc034f..df7de1a99 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -13,19 +13,18 @@ jobs: steps: - name: Search for similar issues run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV - - name: Send message to GPT + - name: Let Gemini reply run: | - curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ + RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "contents": [{ "parts":[ - {"text": "Please write a very short and nice response to this new issue and link possible duplications."}, - {"text": "${{ env.title }}\n${{ env.body }}"}, - {"text": "${{ env.issues }}"} + {"text": "Please write a very short and nice response to this new issue and link possible duplications.\n\n${{ env.title }}\n${{ env.body }}\n\nPossible Duplications:\n${{ env.issues }}"} ] }] - }' + }' | jq -r '.candidates[0].content.parts[0].text') + gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE" env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file From b1da47561fa9da9c4520a906e7aed064a80db965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:16:57 +0200 Subject: [PATCH 09/31] chore: Fix check duplicates job --- .github/workflows/check_duplicates.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index df7de1a99..064e3e7b5 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -10,6 +10,7 @@ jobs: env: title: ${{ github.event.issue.title }} body: ${{ github.event.issue.title }} + GH_TOKEN: ${{ github.token }} steps: - name: Search for similar issues run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV @@ -25,6 +26,7 @@ jobs: ] }] }' | jq -r '.candidates[0].content.parts[0].text') + echo $RESPONSE gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE" env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file From ae4459a7666f8a81e30cd9877dbabd3ce88932ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:20:29 +0200 Subject: [PATCH 10/31] chore: Enhance prompt --- .github/workflows/check_duplicates.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 064e3e7b5..9860c9218 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -16,13 +16,16 @@ jobs: run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV - name: Let Gemini reply run: | + echo "${{ env.issues }}" RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "contents": [{ "parts":[ - {"text": "Please write a very short and nice response to this new issue and link possible duplications.\n\n${{ env.title }}\n${{ env.body }}\n\nPossible Duplications:\n${{ env.issues }}"} + {"text": "Please write a very short and nice response to this new issue. If existing link possible duplications by using markdown links."}, + {"text": "${{ env.title }}\n${{ env.body }}"}, + {"text": "Possible duplications:\n${{ env.issues }}"} ] }] }' | jq -r '.candidates[0].content.parts[0].text') From 10c286e95874e8ce24f8fd50afb7de6b278ae1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:22:09 +0200 Subject: [PATCH 11/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 9860c9218..10c6ac824 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -12,6 +12,7 @@ jobs: body: ${{ github.event.issue.title }} GH_TOKEN: ${{ github.token }} steps: + - uses: actions/checkout@v4 - name: Search for similar issues run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV - name: Let Gemini reply From 806d759ea26a1e00ca958d064db152ea610c1e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:24:48 +0200 Subject: [PATCH 12/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 10c6ac824..b7b7c08f1 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Search for similar issues - run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url)" >> $GITHUB_ENV + run: echo "issues=$(gh issue list --search '${{ env.title }}')" >> $GITHUB_ENV - name: Let Gemini reply run: | echo "${{ env.issues }}" @@ -25,6 +25,7 @@ jobs: "contents": [{ "parts":[ {"text": "Please write a very short and nice response to this new issue. If existing link possible duplications by using markdown links."}, + {"text": "To create a link to a possible duplication, use 'https://github.com/krille-chan/fluffychat/issues/'"}, {"text": "${{ env.title }}\n${{ env.body }}"}, {"text": "Possible duplications:\n${{ env.issues }}"} ] From 2020a2f047cb6f3179cccbce1ba75d0ca3a9d43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:29:19 +0200 Subject: [PATCH 13/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index b7b7c08f1..b0069451a 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Search for similar issues - run: echo "issues=$(gh issue list --search '${{ env.title }}')" >> $GITHUB_ENV + run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url | jq -R '. | @json')" >> $GITHUB_ENV - name: Let Gemini reply run: | echo "${{ env.issues }}" @@ -25,7 +25,6 @@ jobs: "contents": [{ "parts":[ {"text": "Please write a very short and nice response to this new issue. If existing link possible duplications by using markdown links."}, - {"text": "To create a link to a possible duplication, use 'https://github.com/krille-chan/fluffychat/issues/'"}, {"text": "${{ env.title }}\n${{ env.body }}"}, {"text": "Possible duplications:\n${{ env.issues }}"} ] From 44af2d88a73857ffdee3c04d6bc11d6076372069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:46:36 +0200 Subject: [PATCH 14/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index b0069451a..84f28a822 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -10,26 +10,25 @@ jobs: env: title: ${{ github.event.issue.title }} body: ${{ github.event.issue.title }} + author: ${{ github.event.issue.author }} GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - name: Search for similar issues - run: echo "issues=$(gh issue list --search '${{ env.title }}' --json title,body,url | jq -R '. | @json')" >> $GITHUB_ENV + run: echo "issues=$(gh issue list --search '${{ env.title }}')" >> $GITHUB_ENV - name: Let Gemini reply run: | echo "${{ env.issues }}" RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ -H 'Content-Type: application/json' \ -X POST \ - -d '{ - "contents": [{ - "parts":[ - {"text": "Please write a very short and nice response to this new issue. If existing link possible duplications by using markdown links."}, - {"text": "${{ env.title }}\n${{ env.body }}"}, - {"text": "Possible duplications:\n${{ env.issues }}"} + -d "{ + \"contents\": [{ + \"parts\":[ + {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a short response to this Github issue and link the possible duplication issues and ask the author @$author to check those. Otherwise just responde with an empty String.\n\nIssue title: $title\nIssue body: $body\n\nPossible duplications:\n$issues\"} ] - }] - }' | jq -r '.candidates[0].content.parts[0].text') + }] + }" | jq -r '.candidates[0].content.parts[0].text') echo $RESPONSE gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE" env: From 9f864291fa8e319f981092e61f8a081e6e2b0390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:51:26 +0200 Subject: [PATCH 15/31] chore: Fix check duplicates --- .github/workflows/check_duplicates.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 84f28a822..b16f5f895 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -1,4 +1,4 @@ -name: Check Duplicates +name: Check duplicates on: issues: @@ -14,18 +14,17 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - - name: Search for similar issues - run: echo "issues=$(gh issue list --search '${{ env.title }}')" >> $GITHUB_ENV - - name: Let Gemini reply + - name: Check duplicates run: | - echo "${{ env.issues }}" + ISSUES=$(gh issue list --search '${{ env.title }}') + echo $ISSUES RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ -H 'Content-Type: application/json' \ -X POST \ -d "{ \"contents\": [{ \"parts\":[ - {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a short response to this Github issue and link the possible duplication issues and ask the author @$author to check those. Otherwise just responde with an empty String.\n\nIssue title: $title\nIssue body: $body\n\nPossible duplications:\n$issues\"} + {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a short response to this Github issue and link the possible duplication issues and ask the author @$author to check those. Otherwise just responde with an empty String.\n\nIssue title: $title\nIssue body: $body\n\nPossible duplications:\n$ISSUES\"} ] }] }" | jq -r '.candidates[0].content.parts[0].text') From 80c1650f0eeb668ae7fa5f8e598f79cd861fc879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:53:44 +0200 Subject: [PATCH 16/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index b16f5f895..276d40d24 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -24,7 +24,7 @@ jobs: -d "{ \"contents\": [{ \"parts\":[ - {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a short response to this Github issue and link the possible duplication issues and ask the author @$author to check those. Otherwise just responde with an empty String.\n\nIssue title: $title\nIssue body: $body\n\nPossible duplications:\n$ISSUES\"} + {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a short response to this Github issue and link the possible duplication issues and ask the author ${{ env.author }} to check those. Otherwise just responde with an empty String.\n\nIssue title: ${{ env.title }}\nIssue body: ${{ env.body }}\n\nPossible duplications:\n$ISSUES\"} ] }] }" | jq -r '.candidates[0].content.parts[0].text') From a9bd48965e9363bb98f0076b76bcacd6e35c3809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 10:57:58 +0200 Subject: [PATCH 17/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 276d40d24..279247d36 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -24,11 +24,13 @@ jobs: -d "{ \"contents\": [{ \"parts\":[ - {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a short response to this Github issue and link the possible duplication issues and ask the author ${{ env.author }} to check those. Otherwise just responde with an empty String.\n\nIssue title: ${{ env.title }}\nIssue body: ${{ env.body }}\n\nPossible duplications:\n$ISSUES\"} + {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a very short and nice response to this Github issue and link the possible duplication issues and ask the author ${{ env.author }} to check those. If you don't find any duplications, just reply with 'false'. \n\nIssue title: ${{ env.title }}\nIssue body: ${{ env.body }}\n\nPossible duplications:\n$ISSUES\"} ] }] }" | jq -r '.candidates[0].content.parts[0].text') echo $RESPONSE - gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE" + if [ "$RESPONSE" != "false" ]; then + gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE" + fi env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file From c005b320d42a4243371a54936a70247223400eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:05:24 +0200 Subject: [PATCH 18/31] chore: fix duplicates job --- .github/workflows/check_duplicates.yaml | 31 ++++++++++++++----------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 279247d36..30b2b6641 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -11,26 +11,29 @@ jobs: title: ${{ github.event.issue.title }} body: ${{ github.event.issue.title }} author: ${{ github.event.issue.author }} + number: ${{ github.event.issue.number }} GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - name: Check duplicates run: | - ISSUES=$(gh issue list --search '${{ env.title }}') + ISSUES=$(gh issue list --search '${{ env.title }}' | grep -v "${{ number }}"") echo $ISSUES - RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ - -H 'Content-Type: application/json' \ - -X POST \ - -d "{ - \"contents\": [{ - \"parts\":[ - {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a very short and nice response to this Github issue and link the possible duplication issues and ask the author ${{ env.author }} to check those. If you don't find any duplications, just reply with 'false'. \n\nIssue title: ${{ env.title }}\nIssue body: ${{ env.body }}\n\nPossible duplications:\n$ISSUES\"} - ] - }] - }" | jq -r '.candidates[0].content.parts[0].text') - echo $RESPONSE - if [ "$RESPONSE" != "false" ]; then - gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE" + if [ "$ISSUES" != ""]; then + RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ + -H 'Content-Type: application/json' \ + -X POST \ + -d "{ + \"contents\": [{ + \"parts\":[ + {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a very short and nice response to this Github issue and link the possible duplication issues and ask the author ${{ env.author }} to check those. If you don't find any duplications, just reply with 'false'. \n\nIssue title: ${{ env.title }}\nIssue body: ${{ env.body }}\n\nPossible duplications:\n$ISSUES\"} + ] + }] + }" | jq -r '.candidates[0].content.parts[0].text') + echo $RESPONSE + if [ "$RESPONSE" != "false" ]; then + gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE" + fi fi env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file From cb1aedb9ae7b8ea1726357ad67e6ac112bd83cdc Mon Sep 17 00:00:00 2001 From: Jana Date: Sun, 18 May 2025 09:24:27 +0200 Subject: [PATCH 19/31] Translated using Weblate (German) Currently translated at 99.8% (774 of 775 strings) Translation: FluffyChat/Translations Translate-URL: https://hosted.weblate.org/projects/fluffychat/translations/de/ --- assets/l10n/intl_de.arb | 96 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/assets/l10n/intl_de.arb b/assets/l10n/intl_de.arb index 77735f142..b78da3386 100644 --- a/assets/l10n/intl_de.arb +++ b/assets/l10n/intl_de.arb @@ -3291,5 +3291,99 @@ "notSupportedOnThisDevice": "Nicht unterstützt auf diesem Gerät", "@notSupportedOnThisDevice": {}, "ignoreUser": "Nutzer ignorieren", - "@ignoreUser": {} + "@ignoreUser": {}, + "notificationRuleEncryptedRoomOneToOneDescription": "Benachrichtigt den Benutzer über Nachrichten in verschlüsselten Eins-zu-Eins-Chats.", + "@notificationRuleEncryptedRoomOneToOneDescription": {}, + "commandHint_roomupgrade": "Aktualisieren Sie diesen Raum auf die angegebene Raumversion", + "@commandHint_roomupgrade": {}, + "notificationRuleMemberEvent": "Mitgliederveranstaltung", + "@notificationRuleMemberEvent": {}, + "notificationRuleInviteForMeDescription": "Benachrichtigt den Benutzer, wenn er in einen Raum eingeladen wird.", + "@notificationRuleInviteForMeDescription": {}, + "notificationRuleIsUserMentionDescription": "Benachrichtigt den Benutzer, wenn er in einer Nachricht direkt erwähnt wird.", + "@notificationRuleIsUserMentionDescription": {}, + "notificationRuleRoomnotifDescription": "Benachrichtigt den Benutzer, wenn eine Nachricht „@room“ enthält.", + "@notificationRuleRoomnotifDescription": {}, + "notificationRuleRoomOneToOneDescription": "Benachrichtigt den Benutzer über Nachrichten in Einzelchats.", + "@notificationRuleRoomOneToOneDescription": {}, + "notificationRuleEncryptedDescription": "Benachrichtigt den Benutzer über Nachrichten in verschlüsselten Räumen.", + "@notificationRuleEncryptedDescription": {}, + "notificationRuleJitsiDescription": "Benachrichtigt den Benutzer über Jitsi-Widget-Ereignisse.", + "@notificationRuleJitsiDescription": {}, + "checkList": "Checkliste", + "@checkList": {}, + "countInvited": "{count} invited", + "@countInvited": { + "type": "String", + "placeholders": { + "count": { + "type": "int" + } + } + }, + "notificationRuleIsUserMention": "Benutzererwähnung", + "@notificationRuleIsUserMention": {}, + "notificationRuleContainsDisplayName": "Enthält den Anzeigenamen", + "@notificationRuleContainsDisplayName": {}, + "notificationRuleContainsDisplayNameDescription": "Benachrichtigt den Benutzer, wenn eine Nachricht seinen Anzeigenamen enthält.", + "@notificationRuleContainsDisplayNameDescription": {}, + "notificationRuleIsRoomMention": "Chat-Erwähnung", + "@notificationRuleIsRoomMention": {}, + "notificationRuleRoomnotif": "Chat-Benachritigung", + "@notificationRuleRoomnotif": {}, + "notificationRuleTombstoneDescription": "Benachrichtigt den Benutzer über Nachrichten zur Raumdeaktivierung.", + "@notificationRuleTombstoneDescription": {}, + "notificationRuleEncryptedRoomOneToOne": "Verschlüsselter Einzelchat", + "@notificationRuleEncryptedRoomOneToOne": {}, + "notificationRuleRoomOneToOne": "Einzelchat", + "@notificationRuleRoomOneToOne": {}, + "notificationRuleServerAclDescription": "Unterdrückt Benachrichtigungen für Server-ACL-Ereignisse.", + "@notificationRuleServerAclDescription": {}, + "unknownPushRule": "Unbekannte Push-Regel '{rule}'", + "@unknownPushRule": { + "type": "String", + "placeholders": { + "rule": { + "type": "String" + } + } + }, + "deletePushRuleCanNotBeUndone": "Wenn Sie diese Benachrichtigungseinstellung löschen, kann dies nicht rückgängig gemacht werden.", + "@deletePushRuleCanNotBeUndone": {}, + "crossVerifiedDevices": "Cross-verifizierte Geräte", + "@crossVerifiedDevices": {}, + "notificationRuleIsRoomMentionDescription": "Benachrichtigt den Benutzer, wenn ein Raum erwähnt wird.", + "@notificationRuleIsRoomMentionDescription": {}, + "notificationRuleRoomServerAcl": "Raumserver-ACL", + "@notificationRuleRoomServerAcl": {}, + "crossVerifiedDevicesIfEnabled": "Cross-verifizierte Geräte, falls aktiviert", + "@crossVerifiedDevicesIfEnabled": {}, + "notificationRuleServerAcl": "Unterdrücken von Server-ACL-Ereignissen", + "@notificationRuleServerAcl": {}, + "notificationRuleMemberEventDescription": "Unterdrückt Benachrichtigungen zu Mitgliedschaftsereignissen.", + "@notificationRuleMemberEventDescription": {}, + "sentVoiceMessage": "🎙️ {duration} - {sender}", + "@sentVoiceMessage": { + "type": "String", + "placeholders": { + "sender": { + "type": "String" + }, + "duration": { + "type": "String" + } + } + }, + "normalUser": "Normaler Benutzer", + "@normalUser": {}, + "setCustomPermissionLevel": "Benutzerdefinierte Berechtigungsstufe festlegen", + "@setCustomPermissionLevel": {}, + "setPermissionsLevelDescription": "Bitte wählen Sie unten eine vordefinierte Rolle aus oder geben Sie eine benutzerdefinierte Berechtigungsstufe zwischen 0 und 100 ein.", + "@setPermissionsLevelDescription": {}, + "approve": "Genehmigen", + "@approve": {}, + "youHaveKnocked": "Du hast geklopft", + "@youHaveKnocked": {}, + "pleaseWaitUntilInvited": "Bitte warte nun, bis dich jemand aus dem Raum auffordert.", + "@pleaseWaitUntilInvited": {} } From b1b57bd82bba148ec9ccb5051ce97fa01469b3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:12:55 +0200 Subject: [PATCH 20/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 30b2b6641..e86745876 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -11,13 +11,13 @@ jobs: title: ${{ github.event.issue.title }} body: ${{ github.event.issue.title }} author: ${{ github.event.issue.author }} - number: ${{ github.event.issue.number }} + number: ${{ github.event.issue.user.login }} GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - name: Check duplicates run: | - ISSUES=$(gh issue list --search '${{ env.title }}' | grep -v "${{ number }}"") + ISSUES=$(gh issue list --search '${{ env.title }}' | grep -v "${{ env.number }}"") echo $ISSUES if [ "$ISSUES" != ""]; then RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ From c018fd418cd2cd2bc346641dc669ccb61d6fed0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:14:23 +0200 Subject: [PATCH 21/31] chore: Fix check duplicates --- .github/workflows/check_duplicates.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index e86745876..fe806b107 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -10,14 +10,14 @@ jobs: env: title: ${{ github.event.issue.title }} body: ${{ github.event.issue.title }} - author: ${{ github.event.issue.author }} - number: ${{ github.event.issue.user.login }} + author: ${{ github.event.issue.user.login }} + number: ${{ github.event.issue.number }} GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v4 - name: Check duplicates run: | - ISSUES=$(gh issue list --search '${{ env.title }}' | grep -v "${{ env.number }}"") + ISSUES=$(gh issue list --search '${{ env.title }}' | grep -v "${{ env.number }}") echo $ISSUES if [ "$ISSUES" != ""]; then RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ From d417f1d9f46b9728735c71229f5a219d45581449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:24:02 +0200 Subject: [PATCH 22/31] chore: Fix check duplicates job --- .github/workflows/check_duplicates.yaml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index fe806b107..f6fe9b1f6 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -9,7 +9,6 @@ jobs: runs-on: ubuntu-latest env: title: ${{ github.event.issue.title }} - body: ${{ github.event.issue.title }} author: ${{ github.event.issue.user.login }} number: ${{ github.event.issue.number }} GH_TOKEN: ${{ github.token }} @@ -17,23 +16,9 @@ jobs: - uses: actions/checkout@v4 - name: Check duplicates run: | - ISSUES=$(gh issue list --search '${{ env.title }}' | grep -v "${{ env.number }}") - echo $ISSUES + issues=$(gh issue list --search 'Unable to play video' --json number,title,url | jq -r 'map(select(.number != ${{ env.number }})) | .[] | "- [" + .title + "](" + .url + ")"') if [ "$ISSUES" != ""]; then - RESPONSE=$(curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${{ secrets.GEMINI_KEY }}" \ - -H 'Content-Type: application/json' \ - -X POST \ - -d "{ - \"contents\": [{ - \"parts\":[ - {\"text\": \"Please compare issue title and body to possible duplications. If you think this issue could be a duplication, write a very short and nice response to this Github issue and link the possible duplication issues and ask the author ${{ env.author }} to check those. If you don't find any duplications, just reply with 'false'. \n\nIssue title: ${{ env.title }}\nIssue body: ${{ env.body }}\n\nPossible duplications:\n$ISSUES\"} - ] - }] - }" | jq -r '.candidates[0].content.parts[0].text') - echo $RESPONSE - if [ "$RESPONSE" != "false" ]; then - gh issue comment ${{ github.event.issue.number }} --body "$RESPONSE" - fi + gh issue comment ${{ github.event.issue.number }} --body "Thanks for reporting @${{ env.author }}.\nPlease check if this could be a duplicate of one of these issues:\n$issues" fi env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file From b060d70a48fce78d19902b3b6c905602a3cada99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:29:45 +0200 Subject: [PATCH 23/31] chore: Fix duplicates job --- .github/workflows/playground.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/workflows/playground.sh diff --git a/.github/workflows/playground.sh b/.github/workflows/playground.sh new file mode 100644 index 000000000..32474e905 --- /dev/null +++ b/.github/workflows/playground.sh @@ -0,0 +1,4 @@ +number=${{ env.number }} +issues=$(gh issue list --search 'Unable to play video' --json number,title,url | jq --arg num "$number" -r 'map(select(.number != ($num | tonumber))) | .[] | "- [" + .title + "](" + .url + ")"') + +echo -e "Thanks for reporting @${{ evn.author }}.\nPlease check if this could be a duplicate of one of these issues:\n$issues" From 417e3d4b92fb22d858692209462326c9bf78fe2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:30:11 +0200 Subject: [PATCH 24/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 2 +- .github/workflows/playground.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 .github/workflows/playground.sh diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index f6fe9b1f6..5dbcccacc 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - name: Check duplicates run: | - issues=$(gh issue list --search 'Unable to play video' --json number,title,url | jq -r 'map(select(.number != ${{ env.number }})) | .[] | "- [" + .title + "](" + .url + ")"') + issues=$(gh issue list --search '${{ title }}' --json number,title,url | jq -r 'map(select(.number != ${{ env.number }})) | .[] | "- [" + .title + "](" + .url + ")"') if [ "$ISSUES" != ""]; then gh issue comment ${{ github.event.issue.number }} --body "Thanks for reporting @${{ env.author }}.\nPlease check if this could be a duplicate of one of these issues:\n$issues" fi diff --git a/.github/workflows/playground.sh b/.github/workflows/playground.sh deleted file mode 100644 index 32474e905..000000000 --- a/.github/workflows/playground.sh +++ /dev/null @@ -1,4 +0,0 @@ -number=${{ env.number }} -issues=$(gh issue list --search 'Unable to play video' --json number,title,url | jq --arg num "$number" -r 'map(select(.number != ($num | tonumber))) | .[] | "- [" + .title + "](" + .url + ")"') - -echo -e "Thanks for reporting @${{ evn.author }}.\nPlease check if this could be a duplicate of one of these issues:\n$issues" From fc300b74bf250e4dafad77eff33f22864ae5bcd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:31:16 +0200 Subject: [PATCH 25/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 5dbcccacc..31260fc19 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - name: Check duplicates run: | - issues=$(gh issue list --search '${{ title }}' --json number,title,url | jq -r 'map(select(.number != ${{ env.number }})) | .[] | "- [" + .title + "](" + .url + ")"') + issues=$(gh issue list --search '${{ env.title }}' --json number,title,url | jq -r 'map(select(.number != ${{ env.number }})) | .[] | "- [" + .title + "](" + .url + ")"') if [ "$ISSUES" != ""]; then gh issue comment ${{ github.event.issue.number }} --body "Thanks for reporting @${{ env.author }}.\nPlease check if this could be a duplicate of one of these issues:\n$issues" fi From 7a70e0d36d421a3fec47d04e20c4790f53ad9622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:37:53 +0200 Subject: [PATCH 26/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 31260fc19..634171a25 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -16,9 +16,9 @@ jobs: - uses: actions/checkout@v4 - name: Check duplicates run: | - issues=$(gh issue list --search '${{ env.title }}' --json number,title,url | jq -r 'map(select(.number != ${{ env.number }})) | .[] | "- [" + .title + "](" + .url + ")"') + issues=$(gh issue list --search '${{ env.title }}' | grep -v "${{ env.number }}") if [ "$ISSUES" != ""]; then - gh issue comment ${{ github.event.issue.number }} --body "Thanks for reporting @${{ env.author }}.\nPlease check if this could be a duplicate of one of these issues:\n$issues" + gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues" fi env: OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file From 445c212be9b3970639aa716b1d486221ae213bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:45:27 +0200 Subject: [PATCH 27/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 634171a25..db17d27a0 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -16,9 +16,9 @@ jobs: - uses: actions/checkout@v4 - name: Check duplicates run: | - issues=$(gh issue list --search '${{ env.title }}' | grep -v "${{ env.number }}") + issues=$(gh issue list --search '${{ env.title }}' --json number,title,url) + number=${{ env.number }} + issues_filtered=$(echo "$issues" | jq --arg num "$number" 'map(select(.number != ($num | tonumber)))') if [ "$ISSUES" != ""]; then - gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues" - fi - env: - OPENAI_KEY: ${{ secrets.OPENAI_KEY }} \ No newline at end of file + gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues_markdown=$" + fi \ No newline at end of file From 3a0ea19d39b18ab10c50a8a743f8f21a2bcad018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:46:34 +0200 Subject: [PATCH 28/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index db17d27a0..d38722559 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -20,5 +20,5 @@ jobs: number=${{ env.number }} issues_filtered=$(echo "$issues" | jq --arg num "$number" 'map(select(.number != ($num | tonumber)))') if [ "$ISSUES" != ""]; then - gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues_markdown=$" + gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues_markdown" fi \ No newline at end of file From f94d3a96d2102c5f737dac20d709ca6673113b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:47:46 +0200 Subject: [PATCH 29/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index d38722559..31c5e6f3b 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -19,6 +19,7 @@ jobs: issues=$(gh issue list --search '${{ env.title }}' --json number,title,url) number=${{ env.number }} issues_filtered=$(echo "$issues" | jq --arg num "$number" 'map(select(.number != ($num | tonumber)))') + issues_markdown=$(echo "$issues_filtered" | jq -r '.[] | "- [" + .title + "](" + .url + ")"') if [ "$ISSUES" != ""]; then gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues_markdown" fi \ No newline at end of file From 98642f676a0645e44ff18f9a1b51a6d96979e8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:52:02 +0200 Subject: [PATCH 30/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 31c5e6f3b..42f1a95b3 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -19,7 +19,9 @@ jobs: issues=$(gh issue list --search '${{ env.title }}' --json number,title,url) number=${{ env.number }} issues_filtered=$(echo "$issues" | jq --arg num "$number" 'map(select(.number != ($num | tonumber)))') - issues_markdown=$(echo "$issues_filtered" | jq -r '.[] | "- [" + .title + "](" + .url + ")"') - if [ "$ISSUES" != ""]; then + if [ "$(echo "$issues_filtered" | jq length)" -eq 0 ]; then + echo "No duplicates found." + else + issues_markdown=$(echo "$issues_filtered" | jq -r '.[] | "- [" + .title + "](" + .url + ")"') gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues_markdown" fi \ No newline at end of file From 616d36ad39190ba34e093bfc3c967c28032764dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Sun, 18 May 2025 11:55:00 +0200 Subject: [PATCH 31/31] chore: Fix duplicates job --- .github/workflows/check_duplicates.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_duplicates.yaml b/.github/workflows/check_duplicates.yaml index 42f1a95b3..a3ded8d90 100644 --- a/.github/workflows/check_duplicates.yaml +++ b/.github/workflows/check_duplicates.yaml @@ -23,5 +23,6 @@ jobs: echo "No duplicates found." else issues_markdown=$(echo "$issues_filtered" | jq -r '.[] | "- [" + .title + "](" + .url + ")"') - gh issue comment ${{ github.event.issue.number }} --body "@${{ env.author }}\nPossible duplication of:\n$issues_markdown" + formatted_body=$(echo -e "@${{ env.author }}\nPossible duplication of:\n$issues_markdown") + gh issue comment ${{ github.event.issue.number }} --body "$formatted_body" fi \ No newline at end of file