Improve Git flow on this project #580

Open
opened 2026-09-17 18:29:52 +01:00 by Vylpes · 2 comments
Owner

Epic:
Story Points: 5


Adopt a clearer git / release flow: features integrate via develop, hotfixes from main, stage only from release/* and hotfix/*, and drop legacy Drone config. Feature-flag infrastructure is out of scope here (follow-on story).

Current Behaviour

  • Default branch is main; develop exists for integration.
  • Stage Forgejo workflow (.forgejo/workflows/stage.yml) deploys on pushes to main, develop, hotfix/*, and release/*.
  • scripts/deploy_stage.sh checks out develop.
  • CONTRIBUTING.md still references master and does not document this release flow.
  • Legacy .drone.yml remains in the repo.

New Behaviour

  • Documented flow: feature work branches from / merges to develop; hotfixes branch from main; cut release/* when ready to stage and test; develop does not auto-deploy to stage.
  • Stage CI deploys only on release/* and hotfix/* (not main or develop).
  • Stage deploy script(s) align with that branch policy (no hard-coded develop checkout for staging).
  • .drone.yml is removed.
  • CONTRIBUTING.md (and any short in-repo note if needed) describes the flow using main (not master).

Acceptance Criteria

GIVEN I am a contributor reading the docs
WHEN I open the git / contribution flow section
THEN I know features go through develop, hotfixes branch from main, and a release/* branch is cut when ready to stage and test
AND the docs do not tell me to use master as the default branch

GIVEN the stage Forgejo workflow
WHEN I inspect its on.push.branches triggers
THEN only release/* and hotfix/* are listed
AND main and develop are not stage deploy triggers

GIVEN develop receives a push
WHEN stage CI is evaluated
THEN a stage deploy is not started from that push alone

GIVEN stage deploy scripts used by ops or CI
WHEN staging is performed under the new flow
THEN they do not require checking out develop as the stage source of truth

GIVEN the repository root
WHEN I look for Drone config
THEN .drone.yml is absent

Subtasks

  • Update .forgejo/workflows/stage.yml branch filters to release/* and hotfix/* only
  • Update scripts/deploy_stage.sh (and any related stage docs/scripts) for the new branch policy
  • Document the git flow in CONTRIBUTING.md (main / develop / release/* / hotfix/*)
  • Delete .drone.yml

Notes

  • Confirmed: hotfix base = main; develop remains integration without auto-stage.
  • Feature-flag infrastructure: #609 (spun off; not implemented in this ticket).
  • Prod remains tag-based (.forgejo/workflows/production.yml) unless changed elsewhere.
Epic: \ Story Points: 5 --- Adopt a clearer git / release flow: features integrate via `develop`, hotfixes from `main`, stage only from `release/*` and `hotfix/*`, and drop legacy Drone config. Feature-flag **infrastructure** is out of scope here (follow-on story). ## Current Behaviour - Default branch is `main`; `develop` exists for integration. - Stage Forgejo workflow (`.forgejo/workflows/stage.yml`) deploys on pushes to `main`, `develop`, `hotfix/*`, and `release/*`. - `scripts/deploy_stage.sh` checks out `develop`. - `CONTRIBUTING.md` still references `master` and does not document this release flow. - Legacy `.drone.yml` remains in the repo. ## New Behaviour - Documented flow: feature work branches from / merges to `develop`; hotfixes branch from `main`; cut `release/*` when ready to stage and test; `develop` does **not** auto-deploy to stage. - Stage CI deploys only on `release/*` and `hotfix/*` (not `main` or `develop`). - Stage deploy script(s) align with that branch policy (no hard-coded `develop` checkout for staging). - `.drone.yml` is removed. - `CONTRIBUTING.md` (and any short in-repo note if needed) describes the flow using `main` (not `master`). ## Acceptance Criteria GIVEN I am a contributor reading the docs WHEN I open the git / contribution flow section THEN I know features go through `develop`, hotfixes branch from `main`, and a `release/*` branch is cut when ready to stage and test AND the docs do not tell me to use `master` as the default branch GIVEN the stage Forgejo workflow WHEN I inspect its `on.push.branches` triggers THEN only `release/*` and `hotfix/*` are listed AND `main` and `develop` are not stage deploy triggers GIVEN `develop` receives a push WHEN stage CI is evaluated THEN a stage deploy is not started from that push alone GIVEN stage deploy scripts used by ops or CI WHEN staging is performed under the new flow THEN they do not require checking out `develop` as the stage source of truth GIVEN the repository root WHEN I look for Drone config THEN `.drone.yml` is absent ## Subtasks - [ ] Update `.forgejo/workflows/stage.yml` branch filters to `release/*` and `hotfix/*` only - [ ] Update `scripts/deploy_stage.sh` (and any related stage docs/scripts) for the new branch policy - [ ] Document the git flow in `CONTRIBUTING.md` (`main` / `develop` / `release/*` / `hotfix/*`) - [ ] Delete `.drone.yml` ## Notes - Confirmed: hotfix base = `main`; `develop` remains integration without auto-stage. - Feature-flag infrastructure: #609 (spun off; not implemented in this ticket). - Prod remains tag-based (`.forgejo/workflows/production.yml`) unless changed elsewhere.
Vylpes added this to the 3.6.0 milestone 2026-09-17 18:29:52 +01:00
Member

Estimate (needs/estimate)

Story points: 5

Area Rationale
.forgejo/workflows/stage.yml Straightforward branch filter change; needs a quick sanity check against Forgejo workflow syntax.
scripts/deploy_stage.sh + related docs Small script/doc alignment; may need to trace how CI invokes the script.
CONTRIBUTING.md Doc-only update to describe main / develop / release/* / hotfix/*.
Remove .drone.yml Trivial deletion; confirm nothing still references Drone.

Why not 3: multiple touch points (workflow, deploy script, contributor docs) and stage behaviour should be verified after the workflow change.

Why not 8: no application logic changes; acceptance criteria are clear and #609 covers feature-flag infrastructure separately.

Advancing to needs/test.

## Estimate (needs/estimate) **Story points: 5** | Area | Rationale | |------|-----------| | `.forgejo/workflows/stage.yml` | Straightforward branch filter change; needs a quick sanity check against Forgejo workflow syntax. | | `scripts/deploy_stage.sh` + related docs | Small script/doc alignment; may need to trace how CI invokes the script. | | `CONTRIBUTING.md` | Doc-only update to describe `main` / `develop` / `release/*` / `hotfix/*`. | | Remove `.drone.yml` | Trivial deletion; confirm nothing still references Drone. | **Why not 3:** multiple touch points (workflow, deploy script, contributor docs) and stage behaviour should be verified after the workflow change. **Why not 8:** no application logic changes; acceptance criteria are clear and #609 covers feature-flag infrastructure separately. Advancing to **needs/test**.
Smithy-bot stopped working 2026-11-13 11:03:36 +00:00
16 seconds
Member

QA test plan (needs/tests)

Manual verification on the implementation branch / post-merge default branch. Each script maps to acceptance criteria in the issue body. No application runtime behaviour is in scope — CI workflow, deploy script, contributor docs, and legacy Drone removal.

Setup

  • Check out the branch that contains this story’s changes (or main after merge).
  • Have Forgejo UI access (or API) to inspect workflow runs on test branches.
  • Optional: ability to push to a throwaway release/x.y.z-test or hotfix/smoke-test branch if your permissions allow (otherwise use workflow file inspection + dry-run reasoning with maintainer).

TC-1 — CONTRIBUTING documents git flow (main, not master)

Covers: GIVEN I am a contributor … THEN features go through develop, hotfixes from main, release/* for staging … AND docs do not tell me to use master

  1. Open CONTRIBUTING.md (or linked contribution doc).
  2. Locate the git / release flow section.
  3. Expected: Documents feature work merging via develop, hotfixes branching from main, and cutting release/* for stage/test.
  4. Expected: Default/production branch is referred to as main (no instruction to use master as the default branch).

TC-2 — Stage workflow branch triggers (release/*, hotfix/* only)

Covers: GIVEN the stage Forgejo workflow … THEN only release/* and hotfix/* are listed … AND main and develop are not stage deploy triggers

  1. Open .forgejo/workflows/stage.yml.
  2. Inspect on.push.branches (or equivalent trigger configuration).
  3. Expected: Push triggers include release/* and hotfix/*.
  4. Expected: main and develop are not listed as push triggers for the stage workflow.

TC-3 — Push to develop does not start stage deploy

Covers: GIVEN develop receives a push … THEN a stage deploy is not started from that push alone

Option A (preferred, if permitted):

  1. Push an empty commit or docs-only commit to develop.
  2. In Forgejo Actions, find workflow runs for stage.yml (or the stage deploy workflow).
  3. Expected: No new stage deploy run is triggered solely by that develop push.

Option B (static):

  1. From TC-2, confirm develop is absent from stage workflow push triggers.
  2. Expected: No other workflow file re-introduces auto-stage on develop for this repo.

TC-4 — Stage deploy scripts align with branch policy

Covers: GIVEN stage deploy scripts … THEN they do not require checking out develop as the stage source of truth

  1. Open scripts/deploy_stage.sh (and any related stage deploy docs/scripts referenced from the workflow).
  2. Search for develop checkouts, hard-coded branch names, or assumptions that stage source is always develop.
  3. Expected: Script(s) align with deploying from the branch that triggered the workflow (release/* or hotfix/*) or an explicit documented ref — not a mandatory git checkout develop for staging.

TC-5 — Legacy Drone config removed

Covers: GIVEN the repository root … THEN .drone.yml is absent

  1. List repository root files.
  2. Expected: No .drone.yml at repo root.
  3. Expected (spot check): No remaining CI/docs still instruct running Drone for this project (unless historical note only).

TC-6 — release/* or hotfix/* can still trigger stage (smoke)

Covers: TC-2 positive path — stage remains available for intended branches

Option A (if permitted):

  1. Push to a test release/* or hotfix/* branch.
  2. Expected: Stage workflow run is queued/started for that push.

Option B:

  1. Confirm workflow YAML syntax is valid and branch globs match Forgejo Actions expectations.
  2. Expected: Maintainer can trigger stage from release/* / hotfix/* per documented flow.

TC-7 — Production workflow unchanged (regression guard)

Covers: issue note — prod remains tag-based unless changed elsewhere

  1. Open .forgejo/workflows/production.yml (if present).
  2. Expected: No unintended edits tied to this story (tag-based production deploy still as before).
  3. Expected: Stage-only branch filter changes are confined to stage workflow / deploy script / docs.

Pass criteria

All Expected results for TC-1–TC-7 hold on the implementation branch.


Advancing needs/tests → needs/approval. Assigning Vylpes for approval (Smithy-bot planning complete).

## QA test plan (needs/tests) Manual verification on the implementation branch / post-merge default branch. Each script maps to acceptance criteria in the issue body. No application runtime behaviour is in scope — CI workflow, deploy script, contributor docs, and legacy Drone removal. ### Setup - Check out the branch that contains this story’s changes (or `main` after merge). - Have Forgejo UI access (or API) to inspect workflow runs on test branches. - Optional: ability to push to a throwaway `release/x.y.z-test` or `hotfix/smoke-test` branch if your permissions allow (otherwise use workflow file inspection + dry-run reasoning with maintainer). --- ### TC-1 — CONTRIBUTING documents git flow (`main`, not `master`) **Covers:** *GIVEN I am a contributor … THEN features go through `develop`, hotfixes from `main`, `release/*` for staging … AND docs do not tell me to use `master`* 1. Open `CONTRIBUTING.md` (or linked contribution doc). 2. Locate the git / release flow section. 3. **Expected:** Documents feature work merging via `develop`, hotfixes branching from `main`, and cutting `release/*` for stage/test. 4. **Expected:** Default/production branch is referred to as `main` (no instruction to use `master` as the default branch). --- ### TC-2 — Stage workflow branch triggers (`release/*`, `hotfix/*` only) **Covers:** *GIVEN the stage Forgejo workflow … THEN only `release/*` and `hotfix/*` are listed … AND `main` and `develop` are not stage deploy triggers* 1. Open `.forgejo/workflows/stage.yml`. 2. Inspect `on.push.branches` (or equivalent trigger configuration). 3. **Expected:** Push triggers include `release/*` and `hotfix/*`. 4. **Expected:** `main` and `develop` are **not** listed as push triggers for the stage workflow. --- ### TC-3 — Push to `develop` does not start stage deploy **Covers:** *GIVEN `develop` receives a push … THEN a stage deploy is not started from that push alone* **Option A (preferred, if permitted):** 1. Push an empty commit or docs-only commit to `develop`. 2. In Forgejo Actions, find workflow runs for `stage.yml` (or the stage deploy workflow). 3. **Expected:** No new stage deploy run is triggered solely by that `develop` push. **Option B (static):** 1. From TC-2, confirm `develop` is absent from stage workflow push triggers. 2. **Expected:** No other workflow file re-introduces auto-stage on `develop` for this repo. --- ### TC-4 — Stage deploy scripts align with branch policy **Covers:** *GIVEN stage deploy scripts … THEN they do not require checking out `develop` as the stage source of truth* 1. Open `scripts/deploy_stage.sh` (and any related stage deploy docs/scripts referenced from the workflow). 2. Search for `develop` checkouts, hard-coded branch names, or assumptions that stage source is always `develop`. 3. **Expected:** Script(s) align with deploying from the branch that triggered the workflow (`release/*` or `hotfix/*`) or an explicit documented ref — **not** a mandatory `git checkout develop` for staging. --- ### TC-5 — Legacy Drone config removed **Covers:** *GIVEN the repository root … THEN `.drone.yml` is absent* 1. List repository root files. 2. **Expected:** No `.drone.yml` at repo root. 3. **Expected (spot check):** No remaining CI/docs still instruct running Drone for this project (unless historical note only). --- ### TC-6 — `release/*` or `hotfix/*` can still trigger stage (smoke) **Covers:** TC-2 positive path — stage remains available for intended branches **Option A (if permitted):** 1. Push to a test `release/*` or `hotfix/*` branch. 2. **Expected:** Stage workflow run is queued/started for that push. **Option B:** 1. Confirm workflow YAML syntax is valid and branch globs match Forgejo Actions expectations. 2. **Expected:** Maintainer can trigger stage from `release/*` / `hotfix/*` per documented flow. --- ### TC-7 — Production workflow unchanged (regression guard) **Covers:** issue note — prod remains tag-based unless changed elsewhere 1. Open `.forgejo/workflows/production.yml` (if present). 2. **Expected:** No unintended edits tied to this story (tag-based production deploy still as before). 3. **Expected:** Stage-only branch filter changes are confined to stage workflow / deploy script / docs. --- ### Pass criteria All **Expected** results for TC-1–TC-7 hold on the implementation branch. --- Advancing **needs/tests → needs/approval**. Assigning **Vylpes** for approval (Smithy-bot planning complete).
Smithy-bot removed their assignment 2026-11-14 11:01:49 +00:00
Smithy-bot stopped working 2026-11-14 11:01:51 +00:00
1 minute 2 seconds
Vylpes removed their assignment 2026-11-14 12:14:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 1 minute 18 seconds
Smithy-bot
1 minute 18 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RabbitLabs/vylbot-app#580
No description provided.