◐ Shell
clean mode source ↗

require-pr-label.yml: Add missing "permissions:" by hartwork · Pull Request #104309 · python/cpython

I assume this does not need an issue/ticket but I can create one if needed.

This is in reaction to #103635 (review) where @ezio-melotti and I both liked the idea of making the permissions of workflow require-pr-label.yml explicit both for (1) clarity and (2) consistency with all the other workflows that already have their minimally needed permissions set: this is the only worflow where it's missing. For "proof":

# ls -1 .github/workflows/*.yml | grep -F -v -f <(git grep -l permissions -- .github/workflows/)
.github/workflows/require-pr-label.yml

The action's author recommends granting write permissions for full functionality since commit mheap/github-action-required-labels@e330921 but:

  • that is not my mission and out of scope.
  • the action seems to do its base job — effectively marking things as red through failing CI — without write permissions already today.

What do you think?

Looking forward to review, happy to adjust as needed 🍻