(MAINT) Add GHA to check if author can target live #8712
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
This PR adds a new GitHub Action workflow to validate that the author of a PR can target the
livebranch. It runs whenever a PR targeting thelivebranch is opened, reopened, or synchronized (new commits are pushed or the branch is forcibly updated).It checks the collaborators of the repository for the PR author to see if they have permissions as a maintainer or administrator; no other users are authorized to target changes at the
livebranch.If the author does not have the correct permissions, the check fails. With the branch protections for the repository set to require this check when targeting
live, this will prevent unauthorized collaborators from accidentally trying to merge their changes to the live site instead of the working branch.PR Context
Check the boxes below to indicate the content affected by this PR.
Repository or docset configuration
Conceptual documentation
Cmdlet reference & about_ topics
When changing cmdlet reference or about_ topics, the changes should be copied to all
relevant versions. Check the boxes below to indicate the versions affected by this change.
PR Checklist
please add the prefix
WIP:or[WIP]to the beginning of the title and remove the prefix whenthe PR is ready.