Skip to content

Commit d83b12d

Browse files
authored
Remove develop branch references from workflows
Part of org-wide trunk-based migration.
1 parent 469d90c commit d83b12d

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

.github/issue-branch.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
defaultBranch: 'develop'
1+
defaultBranch: 'main'
22
branchName: '${issue.number}:${issue.title,}'
33
mode: auto
44
gitSafeReplacementChar: '-'
55
branches:
66
- label : feature
77
prefix: feature/
8-
name: develop
9-
prTarget: develop
8+
name: main
9+
prTarget: main
1010
skip: false
1111
- label : bug
1212
prefix: bugfix/
13-
name: develop
14-
prTarget: develop
13+
name: main
14+
prTarget: main
1515
skip: false
1616
- label : critical
1717
prefix: hotfix/
1818
name: main
1919
prTarget: main
2020
skip: false
21-
- label : documentation
22-
prefix: doc/
23-
name: main
24-
prTarget: main
2521
- label : '*'
2622
skip: true
2723

.github/workflows/create_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
How to set the version:
99
- explicit: set to a specific value (e.g., 1.3-alpha)
1010
- bump: bump major/minor/patch from current SimpleVersion and apply optional prerelease
11-
- auto: policy-based (develop->next minor -alpha; hotfix/*->next patch -alpha; main/vX.Y->stable)
11+
- auto: policy-based (main/vX.Y->stable; hotfix/*->next patch -alpha; feature branches->next minor -alpha)
1212
type: choice
1313
options: [auto, bump, explicit]
1414
default: auto

.github/workflows/create_test_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_run:
55
workflows: ["Run Tests"]
66
types: [completed]
7-
branches: [main, develop]
7+
branches: [main]
88

99
permissions:
1010
contents: read

.github/workflows/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
pull_request:
77
types: [opened, edited, synchronize, reopened]
8-
branches: [main, develop]
8+
branches: [main]
99

1010
workflow_run:
1111
workflows: [Create Release]

.github/workflows/run_tests.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
workflow_run:
55
workflows: [Create Release]
66
types: [requested]
7-
branches: [main, develop]
7+
branches: [main]
88
workflow_dispatch:
99
pull_request:
1010
types: [opened, edited, synchronize, reopened]
11-
branches: [main, develop]
11+
branches: [main]
1212

1313
permissions:
1414
contents: read
@@ -24,19 +24,22 @@ jobs:
2424
- id: set_branch
2525
shell: bash
2626
run: |
27-
# 1. Pick the raw branch/ref for each trigger type
27+
# Pick the ref to test for each trigger type.
28+
# For pull_request, test the PR head SHA (the incoming changes),
29+
# not the base branch. Using the SHA is deterministic even if
30+
# the PR branch is later force-pushed.
2831
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
29-
RAW='${{ github.event.workflow_run.head_branch }}'
32+
RAW='${{ github.event.workflow_run.head_sha }}'
3033
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
31-
RAW='${{ github.event.pull_request.base.ref }}'
32-
else
33-
RAW='${{ github.ref }}'
34+
RAW='${{ github.event.pull_request.head.sha }}'
35+
else
36+
RAW='${{ github.ref }}'
3437
fi
3538
36-
# 2. Strip the refs/heads/ prefix if present
39+
# Strip the refs/heads/ prefix if present (only relevant for the push/dispatch fallback)
3740
CLEAN="${RAW#refs/heads/}"
3841
39-
echo "Detected branch: $CLEAN"
42+
echo "Detected ref: $CLEAN"
4043
echo "branch_name=$CLEAN" >> "$GITHUB_OUTPUT"
4144
4245
test:

0 commit comments

Comments
 (0)