Skip to content

Commit 35b983e

Browse files
Merge pull request #10 from ContextLab/dev
Update update_readme.yml (v2)
2 parents bc7df0f + bbcd049 commit 35b983e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/update_readme.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,17 @@ jobs:
3939
Please check the workflow logs for more details.
4040
`;
4141
42-
const { data: existingIssues } = await github.issues.listForRepo({
42+
const existingIssues = await github.rest.issues.listForRepo({
4343
owner: context.repo.owner,
4444
repo: context.repo.repo,
4545
state: 'open',
4646
labels: 'bug',
47-
title: issueTitle,
4847
});
4948
50-
if (existingIssues.length === 0) {
51-
await github.issues.create({
49+
const issueExists = existingIssues.data.find(issue => issue.title === issueTitle);
50+
51+
if (!issueExists) {
52+
await github.rest.issues.create({
5253
owner: context.repo.owner,
5354
repo: context.repo.repo,
5455
title: issueTitle,

0 commit comments

Comments
 (0)