chore(deps): bump golang.org/x/time from 0.12.0 to 0.13.0 #386
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Add Label on Ready for Review or Reopen PR | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- ready_for_review | |
branches: | |
- master | |
jobs: | |
add-label: | |
# This condition ensures the label is only added if the PR is not a draft. | |
# When a PR is reopened, it is never in a draft state. | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
issues: write | |
steps: | |
- name: Add 'remind-reviewers' label | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
// List of authors to exclude from reminders. | |
const excludedAuthors = [ | |
'dependabot[bot]', | |
]; | |
const author = context.payload.pull_request.user.login; | |
console.log(`Pull Request author is: ${author}`); | |
// Check if the author is in the exclusion list. | |
if (excludedAuthors.includes(author)) { | |
console.log(`Author '${author}' is in the exclusion list. Skipping label addition.`); | |
return; | |
} | |
github.rest.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ['remind-reviewers'] | |
}) |