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
25 changes: 22 additions & 3 deletions .github/workflows/check-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,29 @@ jobs:
echo "Labels: ${labels}"
echo "labels=${labels}" >> "$GITHUB_OUTPUT"

- name: Validate prdoc for PR#${{ github.event.pull_request.number }}
- name: Get PR number
if: ${{ github.event.pull_request.number != '' && !contains(steps.get-labels.outputs.labels, 'R0') }}
run: |
echo "Validating PR#${GITHUB_PR}"
original_pr_number=''
PR_TITLE="${{ github.event.pull_request.title }}"
if [[ $PR_TITLE =~ 'Backport' ]]; then
# Extracting the original PR number from the backport's PR title
if [[ $PR_TITLE =~ \#([0-9]+) ]]; then
original_pr_number="${BASH_REMATCH[1]}"
echo "Extracted PR number: $original_pr_number"
else
echo "⚠️ The PR title dose not contain original PR number. PR title should be in form: [stableBranchName] Backport #originalPRNumber"
exit 1
fi
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it doesn't match. Failing with a proper error would be great.

else
original_pr_number=${{ github.event.pull_request.number }}
fi
echo "PR_NUMBER=$original_pr_number" >> $GITHUB_ENV

- name: Validate prdoc for PR#${{ env.PR_NUMBER }}
if: ${{ github.event.pull_request.number != '' && !contains(steps.get-labels.outputs.labels, 'R0') }}
run: |
echo "Validating PR#${{ env.PR_NUMBER }}"
python3 --version
python3 -m pip install cargo-workspace==1.2.1
python3 .github/scripts/check-prdoc.py Cargo.toml prdoc/pr_${GITHUB_PR}.prdoc
python3 .github/scripts/check-prdoc.py Cargo.toml prdoc/pr_${{ env.PR_NUMBER }}.prdoc
4 changes: 4 additions & 0 deletions docs/BACKPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Backports should only be used to fix bugs or security issues - never to introduc

The label can also be added after the PR is merged.

ℹ️ If, for some reasons, a backport PR was not created automatically, it can be done manually.
But it is important, that the PR title follows the following pattern:
`[stableBranchName] Backport #originalPRNumber` (i.e. **[stable2412] Backport #8198**)

## Example

For example here where the dev triggered the process by adding the label after merging:
Expand Down
12 changes: 1 addition & 11 deletions docs/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,7 @@ in the repo with the actual release dates.

Cadence: every month. Responsible: Developer

Describes how developers should merge bug and security fixes.

### Steps

1. Developer opens a Pull Request with a bug or security fix.
2. The Pull Request is marked as priority fix.
3. Audit happens with priority.
4. It is merged into `master`.
5. Dev adds the `A4-needs-backport` label.
6. It is automatically back-ported to `stable` and merged by a release engineer.
7. The fix will be released in the next *Stable patch* release. In urgent cases, a release can happen earlier.
Backporting rules can be found in the [BACKPORT.md](/docs/BACKPORT.md)

The release itself is similar to [the new stable release](#steps-to-execute-a-new-stable-release) process without
the branching-off step, as the branch already exists and depending on the patch
Expand Down
Loading