Skip to content

Commit

Permalink
Merge pull request #1719 from okta/pr_1703_exitcode0
Browse files Browse the repository at this point in the history
@exitcodes's #1703
  • Loading branch information
MikeMondragon-okta authored Sep 12, 2023
2 parents 09178f9 + 0f60ad2 commit ed0ce6f
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/unstale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Remove Label on Issue Comment

permissions:
issues: write

on:
issue_comment:
types: [created]

jobs:
issue_commented:
name: Issue comment
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labelToRemove = 'waiting-response';
const issueNumber = context.issue.number;
const owner = context.repo.owner;
const repo = context.repo.repo;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: owner,
repo: repo,
issue_number: issueNumber
});
const labelNames = labels.map(label => label.name);
if (labelNames.includes(labelToRemove)) {
await github.rest.issues.removeLabel({
issue_number: issueNumber,
owner: owner,
repo: repo,
name: labelToRemove
});
}
# pr_commented:
# # This job only runs for pull request comments
# name: PR comment
# if: ${{ github.event.issue.pull_request }}
# runs-on: ubuntu-latest
# steps:
# - run: |
# echo A comment on PR $NUMBER
# env:
# NUMBER: ${{ github.event.issue.number }}

0 comments on commit ed0ce6f

Please sign in to comment.