fix(permission-gate): guard release-* branch and v* tag pushes (deploy convention)
Deploy convention at M.Video: a release-* branch push deploys to stage and a v* tag push deploys to PROD. The old guard only matched release/* (slash) and never caught tag pushes, so a prod deploy could run unconfirmed. - permission-gate: match main/master, release-[-/], --tags/--follow-tags, and whitespace-preceded v<digit> tags; false-positive-safe (space discriminator) - create-mr.sh: refuse source branch release-* (not just release/*) - jira-workflow doc updated to release-* Verified with a behavioral test suite (10 cases incl. v2, false-positive checks).
This commit is contained in:
@@ -26,8 +26,8 @@ JIRA_KEY="${4:-}"
|
||||
|
||||
# --- Refuse to open an MR *from* a protected branch (safety). ----------------
|
||||
case "$SOURCE" in
|
||||
main | master | release/*)
|
||||
echo "Refusing: source branch '$SOURCE' looks protected. Create a feature branch first." >&2
|
||||
main | master | release-* | release/*)
|
||||
echo "Refusing: source branch '$SOURCE' looks protected/release. Create a feature branch first." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user