Skip to content

Commit 3ec19dc

Browse files
committed
Add a check if the issue exists and add the link tothe issue
1 parent 30c1224 commit 3ec19dc

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/perf-gradle-compatibility-tests.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,19 @@ jobs:
4141
uses: actions/github-script@v7
4242
with:
4343
script: |
44-
await github.rest.issues.create({
45-
owner: context.repo.owner,
46-
repo: context.repo.repo,
47-
title: 'Perf Gradle Compatibility test failed',
48-
assignees: ['tejasd'],
49-
labels: ['bug', 'automated']
50-
})
44+
const issueTitle = 'Perf Gradle Compatibility test failed';
45+
46+
const { data: searchResults } = await github.rest.search.issuesAndPullRequests({
47+
q: `is:issue is:open repo:${context.repo.owner}/${context.repo.repo} in:title "${issueTitle}"`,
48+
});
49+
50+
if (searchResults.total_count === 0) {
51+
await github.rest.issues.create({
52+
owner: context.repo.owner,
53+
repo: context.repo.repo,
54+
title: issueTitle,
55+
body: `https://github.com/firebase/firebase-android-sdk/actions/workflows/perf-gradle-compatibility-tests.yml`
56+
assignees: ['tejasd'],
57+
labels: ['bug', 'automated']
58+
})
59+
}

0 commit comments

Comments
 (0)