Skip to content

Commit

Permalink
Merge pull request #51 from tsu-ki/patch-1
Browse files Browse the repository at this point in the history
Github Actions Fix
  • Loading branch information
DonnieBLT authored Jan 1, 2025
2 parents fe311c6 + 4e507aa commit a48c7f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,13 @@ const run = async () => {
issue_number: event.issue.number
});

const query = `type:pr state:open repo:${owner}/${repo} ${assignedIssue.number} in:body`;
const pullRequests = await octokit.search.issuesAndPullRequests({
q: query,
});


if (issueDetails.data.labels.length === 0) {
if (issueDetails.data.labels.length === 0 && pullRequests.data.total_count === 0) {
console.log('unassigning ' + event.issue.assignee.login + " from " + event.issue.number);

await octokit.issues.removeAssignees({
Expand Down

0 comments on commit a48c7f7

Please sign in to comment.