This PR upgrades the branch-label action to use Node.js v20.
The actions-ecosystem/action-add-labels action has not been updated for almost 4 years. Therefore, this PR changes to use an alternative actions/labeler action to achieve the same function.
In addition, to avoid the issue of not having permission to add labels to pull requests, the example changes the recommended event to the pull_request_target instead of pull_request.
Changes proposed in this Pull Request:
Part of #108
This PR upgrades the
branch-label
action to use Node.js v20.actions-ecosystem/action-add-labels
action has not been updated for almost 4 years. Therefore, this PR changes to use an alternativeactions/labeler
action to achieve the same function.pull_request_target
instead ofpull_request
.Detailed test instructions:
📌 Using Node.js v20
📌 View testing PRs to see if the alternative implementation can achieve the same results
1️⃣ Add a label: https://github.com/eason9487/grow/pull/24
2️⃣ Add multiple labels: https://github.com/eason9487/grow/pull/25
3️⃣ Mismatched branch name: https://github.com/eason9487/grow/pull/26
No labels are added because the branch name
fixed/space-time-rift
didn't match any rules.4️⃣ No required permissions: https://github.com/eason9487/grow/pull/29
This test explains that a workflow uses
pull_request
event may result in permission issue when a PR is created from forks.