Skip to content

Commit a9cbce5

Browse files
GHA-178 Use lock-branch action in automated release workflow (#88)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c9666d8 commit a9cbce5

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

.github/workflows/automated-release.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,12 @@ jobs:
148148
permissions:
149149
id-token: write
150150
steps:
151-
- &freeze-branch-secrets
152-
id: secrets
153-
uses: SonarSource/vault-action-wrapper@v3
151+
- name: Freeze branch
152+
uses: SonarSource/release-github-actions/lock-branch@2a5ddd698dd3992bf592cf454a04da8fc99fecc5
154153
with:
155-
secrets: |
156-
development/github/token/{REPO_OWNER_NAME_DASH}-lock token | lock_token;
157-
development/kv/data/slack token | slack_api_token;
158-
- &freeze-branch-toggle
159-
uses: sonarsource/gh-action-lt-backlog/ToggleLockBranch@v2
160-
with:
161-
github-token: ${{ fromJSON(steps.secrets.outputs.vault).lock_token }}
162-
slack-token: ${{ fromJSON(steps.secrets.outputs.vault).slack_api_token }}
154+
branch: ${{ inputs.branch }}
155+
freeze: true
163156
slack-channel: ${{ inputs.slack-channel }}
164-
branch-pattern: ${{ inputs.branch }}
165157
- name: Summary
166158
if: ${{ inputs.verbose }}
167159
shell: bash
@@ -398,8 +390,12 @@ jobs:
398390
permissions:
399391
id-token: write
400392
steps:
401-
- *freeze-branch-secrets
402-
- *freeze-branch-toggle
393+
- name: Unfreeze branch
394+
uses: SonarSource/release-github-actions/lock-branch@2a5ddd698dd3992bf592cf454a04da8fc99fecc5
395+
with:
396+
branch: ${{ inputs.branch }}
397+
freeze: false
398+
slack-channel: ${{ inputs.slack-channel }}
403399
- name: Summary
404400
if: ${{ inputs.verbose }}
405401
shell: bash

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Related Jira tickets for this project are tracked in the **GHA** (GitHub Automat
1313
## Branching
1414

1515
**Critical:** Changes must always be made on a feature branch, never directly on `master`. Before any commit, verify you are not on `master`.
16-
- If on `master`, create a new branch using the format: `ab/<feature-name>` (e.g., `ab/add-slack-notifications`)
17-
- The prefix `ab` represents the developer's initials (first letter of first name + first letter of last name)
16+
- If on `master`, create a new branch using the format: `<username-prefix>/<feature-name>` (e.g., `ab/add-slack-notifications`)
17+
- Ask for the prefix to use from the team if unsure (e.g., `ab/` for Antoine B., `js/` for Jean S., etc.)
1818
- Adapt `<feature-name>` based on the task/prompt (use lowercase, hyphen-separated)
1919
- If already on a feature branch, do not create a new branch—continue working on the current branch
2020

0 commit comments

Comments
 (0)