Skip to content

Commit

Permalink
fix(.github): use correct output of github response
Browse files Browse the repository at this point in the history
Signed-off-by: Charly Molter <[email protected]>
  • Loading branch information
lahabana committed Jan 21, 2022
1 parent e151610 commit 17cc853
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rolling-issue-assignment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
};
const issue = await github.rest.issues.get(baseReq);
const candidates ="${{ inputs.users }}".split(",");
const assignees = issue.data.assignees;
let newAssignee = "";
console.log(issue);
if (!issue || issue.assignees.length === 0) {
if (assignees.length === 0) {
newAssignee = candidates[0];
} else {
const curAssignee = issue.assignees[0].login;
const curAssignee = assignees[0].login;
await github.rest.issues.removeAssignees({...baseReq, assignees: [curAssignee]});
for (let i = 0; i < candidates.length; i++) {
if (candidates[i] === curAssignee) {
Expand Down

0 comments on commit 17cc853

Please sign in to comment.