diff --git a/.github/workflows/goalie-cron.yaml b/.github/workflows/goalie.yaml similarity index 76% rename from .github/workflows/goalie-cron.yaml rename to .github/workflows/goalie.yaml index 24b037546a..ee0a6a248e 100644 --- a/.github/workflows/goalie-cron.yaml +++ b/.github/workflows/goalie.yaml @@ -1,10 +1,8 @@ # on a review from someone in the reviewers group, remove the awaiting-review label and add the awaiting-author label -name: Goalie Cron -on: push - -# on: -# schedule: -# - cron: "* * * * *" +name: Goalie Workflow +on: + schedule: + - cron: "* * * * *" jobs: label: @@ -14,8 +12,8 @@ jobs: id: get_workflow_token uses: peter-murray/workflow-application-token-action@v1 with: - application_id: ${{ secrets.BACKSTAGE_WORKFLOW_MEMBER_READ_APP_ID }} - application_private_key: ${{ secrets.BACKSTAGE_WORKFLOW_MEMBER_READ_PRIVATE_KEY }} + application_id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }} + application_private_key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }} organization: backstage - uses: actions/checkout@v2 diff --git a/scripts/goalie-labels.js b/scripts/goalie-labels.js index 01ec5dee7c..e9765aebb8 100644 --- a/scripts/goalie-labels.js +++ b/scripts/goalie-labels.js @@ -89,15 +89,14 @@ module.exports = async ({ github, context, core }) => { } if (hasReviewed.size === expectedReviewers.size) { - console.log('should remove label'); - // await github.rest.issues.removeLabel({ - // issue_number: context.issue.number, - // owner: context.repo.owner, - // repo: context.repo.repo, - // name: 'awaiting-review' - // }).catch(() => {}); - } else { - console.log('should add label'); + await github.rest.issues + .removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'awaiting-review', + }) + .catch(() => {}); } } };