Skip to content

Commit

Permalink
Plugin Validation: Make sure that ObsidianReviewBot is not reassigned…
Browse files Browse the repository at this point in the history
… after it has left it's review
  • Loading branch information
joethei committed Dec 5, 2024
1 parent 0293863 commit ae73a10
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/validate-plugin-entry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,25 @@ jobs:
pull_number: context.issue.number,
title: `Add plugin: ${plugin.name}`
});
await github.rest.issues.addAssignees({
const comments = github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
assignees: 'ObsidianReviewBot'
issue_number: context.issue.number
});
const commentAuthors = [];
for (const comment in comments) {
commentAuthors.push(comment.user.login);
}
if (!commentAuthors.includes("ObsidianReviewBot")) {
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
assignees: 'ObsidianReviewBot'
});
}
if(!context.payload.pull_request.labels.filter(label => label.name === 'Changes requested').length > 0) {
labels.push("Ready for review");
Expand Down

0 comments on commit ae73a10

Please sign in to comment.