Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/advance-deploy-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Advance deploy environment
# Reusable workflow. Called from each active repo on push to develop/staging/master/main.
# For each PR contained in the push, updates the Deploy environment project field
# and advances Status through the multi-stage validation flow:
# develop -> Status = "FR on dev" (functional review on dev environment)
# develop -> Status = "On dev" (automatic; no dev-side review — D6)
# staging -> Status = "FR on staging" (functional review on staging environment)
# master/main -> Status = "Prod" (shipped to production)
#
# The "Ready for staging" / "Ready for prod" intermediate states are set manually
# The "Ready for prod" intermediate state is set manually via /fr-pass at staging
# (drag-and-drop on the kanban or via a /fr-pass comment) when the FR reviewer
# declares the validation passed but the deploy hasn't happened yet.
#
Expand All @@ -22,7 +22,7 @@ name: Advance deploy environment
#
# The override merges with the default mapping. Anything you don't explicitly
# remap stays on the default. Keys are branch names; values are Status column
# names ("Prod", "FR on staging", "FR on dev").
# names ("Prod", "FR on staging", "On dev").

on:
workflow_call:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
set -euo pipefail
# Default mapping
case "$BRANCH" in
develop) DEPLOY_ENV="dev"; STATUS_NAME="FR on dev" ;;
develop) DEPLOY_ENV="dev"; STATUS_NAME="On dev" ;;
staging) DEPLOY_ENV="staging"; STATUS_NAME="FR on staging" ;;
master|main) DEPLOY_ENV="prod"; STATUS_NAME="Prod" ;;
*) DEPLOY_ENV=""; STATUS_NAME="" ;;
Expand All @@ -74,7 +74,7 @@ jobs:
case "$OVERRIDE" in
"Prod") DEPLOY_ENV="prod" ;;
"FR on staging") DEPLOY_ENV="staging" ;;
"FR on dev") DEPLOY_ENV="dev" ;;
"On dev") DEPLOY_ENV="dev" ;;
esac
fi
fi
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/fr-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ name: FR gate
# targeting staging, main, or master. Blocks the merge unless every item
# included in the promotion is at or beyond the correct "Ready for X" column:
#
# target = staging → all items must be at "Ready for staging" or later
# target = staging → all items must be at "On dev" or later (automatic — D6)
# target = main/master → all items must be at "Ready for prod" or later
#
# "or later" means an item already further down the pipeline (e.g. "Prod")
# satisfies an earlier gate ("Ready for staging") instead of being falsely
# satisfies an earlier gate ("On dev") instead of being falsely
# blocked. See the rank() helper below for the canonical stage ordering.
#
# This enforces the "FR must pass before promotion" rule. It runs as a
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
BASE: ${{ github.base_ref }}
run: |
case "$BASE" in
staging) echo "required=Ready for staging" >> "$GITHUB_OUTPUT" ;;
staging) echo "required=On dev" >> "$GITHUB_OUTPUT" ;;
main|master) echo "required=Ready for prod" >> "$GITHUB_OUTPUT" ;;
*) echo "required=" >> "$GITHUB_OUTPUT" ;;
esac
Expand Down Expand Up @@ -207,7 +207,7 @@ jobs:

# Pipeline rank for each kanban Status. An item satisfies the gate when
# it is AT OR BEYOND the required stage — e.g. an item already in "Prod"
# trivially satisfies a "Ready for staging" gate. Strict equality used to
# trivially satisfies an "On dev" gate. Strict equality used to
# falsely block already-promoted items that reappear in a later promotion's
# commit range. Unknown statuses (incl. "Cancelled") return empty and fall
# through to the strict-equality path below, preserving the old behavior.
Expand All @@ -218,11 +218,10 @@ jobs:
"Ready") echo 3 ;;
"In progress") echo 4 ;;
"Code review") echo 5 ;;
"FR on dev") echo 6 ;;
"Ready for staging") echo 7 ;;
"FR on staging") echo 8 ;;
"Ready for prod") echo 9 ;;
"Prod") echo 10 ;;
"On dev") echo 6 ;;
"FR on staging") echo 7 ;;
"Ready for prod") echo 8 ;;
"Prod") echo 9 ;;
*) echo "" ;;
esac
}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/fr-pass-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: FR pass comment handler

# Reusable workflow. Called from each active repo on issue_comment created.
# Listens for "/fr-pass" comments on PRs/issues that are currently in
# "FR on dev" or "FR on staging" and advances them to the next column:
# FR on dev → Ready for staging
# "FR on staging" and advances it to the next column:
# FR on staging → Ready for prod
# (D6: the dev-side review is gone — "On dev" is automatic — so /fr-pass only
# applies at staging, the single functional-review gate.)
#
# Only repo collaborators can trigger this (MEMBER / OWNER / COLLABORATOR).
# The workflow reacts on the comment with 👍 on success, 👎 on no-op so the
Expand Down Expand Up @@ -104,10 +105,9 @@ jobs:

# Decide the next status from the current one.
case "$CURRENT" in
"FR on dev") NEXT="Ready for staging" ;;
"FR on staging") NEXT="Ready for prod" ;;
*)
echo "Item is in '$CURRENT' — /fr-pass only applies to 'FR on dev' or 'FR on staging'. Skipping."
echo "Item is in '$CURRENT' — /fr-pass only applies to 'FR on staging' (the one functional review, on staging). Skipping."
echo "result=wrong-column" >> "$GITHUB_OUTPUT"
exit 0
;;
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/kanban-closure-router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Route kanban Status on closure

# Reusable workflow. Called on PR closed + issue closed events.
# Sets the correct Status based on what actually happened:
# - PR merged to develop → FR on dev (functional review on dev environment)
# - PR merged to develop → On dev (automatic; no dev-side review — D6)
# - PR merged to staging → FR on staging (functional review on staging environment)
# - PR merged to main/master → Prod (shipped to prod)
# - PR closed without merging → Cancelled
Expand Down Expand Up @@ -59,8 +59,8 @@ jobs:
case "$BASE_REF" in
main|master) STATUS="Prod" ;;
staging) STATUS="FR on staging" ;;
develop) STATUS="FR on dev" ;;
*) STATUS="FR on dev" ;;
develop) STATUS="On dev" ;;
*) STATUS="On dev" ;;
esac
else
STATUS="Cancelled"
Expand Down Expand Up @@ -105,10 +105,10 @@ jobs:
case "$CLOSING_PR_BASE" in
main|master) STATUS="Prod" ;;
staging) STATUS="FR on staging" ;;
develop) STATUS="FR on dev" ;;
develop) STATUS="On dev" ;;
# Unrecognised base: mirror what the pull_request branch above
# does for the same base, so the issue and its PR agree.
*) STATUS="FR on dev" ;;
*) STATUS="On dev" ;;
esac
fi
else
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kanban-reconcile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
fi
echo "$OUT" | jq -c '.data.organization.projectV2.items.nodes[]
| select(.fieldValueByName.name as $s
| ["Code review","FR on dev","Ready for staging",
| ["Code review","On dev",
"FR on staging","Ready for prod"] | index($s))' \
>> items.ndjson

Expand Down Expand Up @@ -251,7 +251,7 @@ jobs:

if [ "$STATE" = "OPEN" ]; then
case "$COL" in
"Ready for prod"|"FR on staging"|"FR on dev"|"Ready for staging")
"Ready for prod"|"FR on staging"|"On dev")
printf '%s\t%s\t%s\t%s\n' "$ITEM_ID" "$BACKLOG_OPT" "$REPO#$NUM open issue in $COL -> Backlog" "misplaced-issue" >> moves.tsv
continue ;;
esac
Expand Down
Loading