We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bc7df0f + bbcd049 commit 35b983eCopy full SHA for 35b983e
.github/workflows/update_readme.yml
@@ -39,16 +39,17 @@ jobs:
39
Please check the workflow logs for more details.
40
`;
41
42
- const { data: existingIssues } = await github.issues.listForRepo({
+ const existingIssues = await github.rest.issues.listForRepo({
43
owner: context.repo.owner,
44
repo: context.repo.repo,
45
state: 'open',
46
labels: 'bug',
47
- title: issueTitle,
48
});
49
50
- if (existingIssues.length === 0) {
51
- await github.issues.create({
+ const issueExists = existingIssues.data.find(issue => issue.title === issueTitle);
+
+ if (!issueExists) {
52
+ await github.rest.issues.create({
53
54
55
title: issueTitle,
0 commit comments