Skip to content

Commit

Permalink
hel
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Apr 7, 2023
1 parent e288f8b commit 1374370
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/triage-info-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue = await github.issues.get({
const issue = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
Expand All @@ -36,7 +36,7 @@ jobs:
const shouldAddLabel = isTeamMember && commentAuthor !== issue.data.user.login && isRequestForInfo;
if (shouldAddLabel) {
await github.issues.addLabels({
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
Expand All @@ -55,15 +55,15 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue = await github.issues.get({
const issue = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const commentAuthor = context.payload.comment.user.login;
const issueAuthor = issue.data.user.login;
if (commentAuthor === issueAuthor) {
await github.issues.removeLabel({
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
Expand All @@ -77,7 +77,7 @@ jobs:
}
// Loop through all the comments on the issue in reverse order and find the last username that a TRIAGER mentioned
// If the comment author is the last mentioned username, remove the "info-needed" label
const comments = await github.issues.listComments({
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
Expand All @@ -89,7 +89,7 @@ jobs:
const matches = comment.body.match(/@\w+/g) || [];
const mentionedUsernames = matches.map(match => match.replace('@', ''));
if (mentionedUsernames.includes(commentAuthor)) {
await github.issues.removeLabel({
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
Expand Down

0 comments on commit 1374370

Please sign in to comment.