Skip to content
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

Make all prdoc valid and add CI job to check prdoc with prdoc check #7543

Merged
merged 12 commits into from
Feb 18, 2025

Conversation

gui1117
Copy link
Contributor

@gui1117 gui1117 commented Feb 11, 2025

Some prdoc are invalid, prdoc check is failing for them. This also broke usage of parity-publish.

This PR fixes the invalid prdoc, and add a ci job to check the prdoc are valid. I don't think the check is unstable considering it is a simple yaml check, so I put the job as required.

@gui1117 gui1117 requested review from a team as code owners February 11, 2025 13:17
@gui1117 gui1117 added the R0-silent Changes should not be mentioned in any release notes label Feb 11, 2025
@paritytech-review-bot paritytech-review-bot bot requested a review from a team February 12, 2025 00:34
@paritytech-review-bot paritytech-review-bot bot requested a review from a team February 13, 2025 00:10
@paritytech-review-bot paritytech-review-bot bot requested a review from a team February 13, 2025 09:22
timeout-minutes: 20
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- name: prdoc check
Copy link
Member

Choose a reason for hiding this comment

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

Why isn't that just part of the CheckPrdoc job?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it would be similar to fmt.

But I refactored and put inside the CheckPrdoc: basically it was ignoring errors when R0-silent, I make the check mandatory: 5013295

echo "PR detected as silent, but a PRDoc was found, checking it as information"
$ENGINE run --rm -v $PWD:/repo $IMAGE check -n ${GITHUB_PR} || echo "Ignoring failure"
echo "PR detected as silent, but a PRDoc was found, checking it"
$ENGINE run --rm -v $PWD:/repo $IMAGE check -n ${GITHUB_PR}
Copy link
Contributor

Choose a reason for hiding this comment

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

This step checks only if there is a PRdoc for this PR and validates it. If the idea was to check all existing prdocs I'd suggest adding an additional job check-prdoc-all that will check all prdocs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, in this commit I refactor to just check for all prdoc:
6930f83

@gui1117 gui1117 added R0-silent Changes should not be mentioned in any release notes and removed R0-silent Changes should not be mentioned in any release notes labels Feb 18, 2025
@gui1117 gui1117 enabled auto-merge February 18, 2025 01:45
@gui1117
Copy link
Contributor Author

gui1117 commented Feb 18, 2025

Needs one more approval from @paritytech/core-devs

Edit: Sorry for the spam, I somehow thought it was only frame coders


- name: Validate prdoc for PR#${{ github.event.pull_request.number }}
if: ${{ !contains(steps.get-labels.outputs.labels, 'R0') }}
if: ${{ github.event.pull_request.number != '' && !contains(steps.get-labels.outputs.labels, 'R0') }}
Copy link
Contributor

Choose a reason for hiding this comment

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

There could be R0 with PR doc. Maybe we should also validate it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes true, but at the same time R0 means it doesn't show in the changelog so change should be minor.

@gui1117 gui1117 added this pull request to the merge queue Feb 18, 2025
Merged via the queue into master with commit b6512be Feb 18, 2025
246 of 282 checks passed
@gui1117 gui1117 deleted the gui-fix-prdoc branch February 18, 2025 08:04
clangenb pushed a commit to clangenb/polkadot-sdk that referenced this pull request Feb 19, 2025
…paritytech#7543)

Some prdoc are invalid, `prdoc check` is failing for them. This also
broke usage of parity-publish.

This PR fixes the invalid prdoc, and add a ci job to check the prdoc are
valid. I don't think the check is unstable considering it is a simple
yaml check, so I put the job as required.

---------

Co-authored-by: Alexander Samusev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants