-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[CI/CD] Use original PR name in prdoc check for the backport PR's to the stable branches #8329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
EgorPopelyaev
merged 10 commits into
paritytech:master
from
EgorPopelyaev:ep-use-original-pr-name-in-prdoc-check
Apr 25, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6ed7661
add a step to extract pr number from the title for the backport prs
EgorPopelyaev 9a7119c
change name of the var
EgorPopelyaev 649327d
add prdoc to test
EgorPopelyaev 068a2cd
one more test
EgorPopelyaev 33aa188
rename prdoc for test
EgorPopelyaev cb49799
delete test prdoc
EgorPopelyaev 59a6db4
Address PR comments
EgorPopelyaev 8194883
fix typo
EgorPopelyaev f69d328
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
EgorPopelyaev 2e729a0
one more typo
EgorPopelyaev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
ggwpez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.