-
Notifications
You must be signed in to change notification settings - Fork 15
ci: check that PR title and source code changes are aligned #1414
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
base: julio/versioning/enforce-conventional-commits-pr
Are you sure you want to change the base?
ci: check that PR title and source code changes are aligned #1414
Conversation
BenchmarksComparisonBenchmark execution time: 2025-12-19 16:54:10 Comparing candidate commit 6d70344 in PR branch Found 2 performance improvements and 14 performance regressions! Performance is the same for 41 metrics, 2 unstable metrics. scenario:credit_card/is_card_number/ 3782-8224-6310-005
scenario:credit_card/is_card_number/ 378282246310005
scenario:credit_card/is_card_number/378282246310005
scenario:credit_card/is_card_number/37828224631000521389798
scenario:credit_card/is_card_number_no_luhn/ 378282246310005
scenario:credit_card/is_card_number_no_luhn/378282246310005
scenario:credit_card/is_card_number_no_luhn/37828224631000521389798
scenario:profile_add_sample2_frames_x1000
scenario:sql/obfuscate_sql_string
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
Group 18
Group 19
BaselineOmitted due to size. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## julio/versioning/enforce-conventional-commits-pr #1414 +/- ##
====================================================================================
- Coverage 71.44% 71.41% -0.03%
====================================================================================
Files 406 411 +5
Lines 65203 66028 +825
====================================================================================
+ Hits 46585 47157 +572
- Misses 18618 18871 +253
🚀 New features to boost your workflow:
|
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-apple-darwin
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-apple-darwin
x86_64-unknown-linux-gnu
|
| echo "No published crates changed in this PR" | ||
| else | ||
| echo "has_changes=true" >> "$GITHUB_OUTPUT" | ||
| CRATES_JSON=$(printf '%s\n' "${CHANGED_CRATES[@]}" | jq -R . | jq -s .) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GITHUB_OUTPUT requires single-line values
| CRATES_JSON=$(printf '%s\n' "${CHANGED_CRATES[@]}" | jq -R . | jq -s .) | |
| CRATES_JSON=$(printf '%s\n' "${CHANGED_CRATES[@]}" | jq -R . | jq -s -c .) |
| persist-credentials: false | ||
|
|
||
| - name: Install Rust ${{ env.RUST_VERSION }} | ||
| run: rustup install ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems cargo-public-api requires nightly
| run: rustup install ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }} | |
| run: rustup install ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }} && rustup install nightly --profile minimal |
|
|
||
| - name: Install cargo-semver-checks | ||
| run: | | ||
| apt install libssl-dev # cargo-public-api dependency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo can be needed
| apt install libssl-dev # cargo-public-api dependency | |
| sudo apt update && sudo apt install -y libssl-dev # cargo-public-api dependency |
|
|
||
| # Try to run cargo-public-api diff | ||
| set +e | ||
| cargo public-api --package "$CRATE_NAME" diff "$CURRENT_VERSION" 2>&1 | tee api-output.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we diff with the published version of the crate, or with the commit from main branch? I mean, it should be limited just to the changes in the PR, isn't it?
| with: | ||
| cache-targets: true | ||
|
|
||
| - name: Install cargo-semver-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - name: Install cargo-semver-checks | |
| - name: Install cargo-public-api |
| echo "$HIGHEST_LEVEL" > semver-level.txt | ||
| printf '%s\n' "${CRATES_CHECKED[@]}" > crates_checked.txt || true | ||
|
|
||
| - name: Aggregate results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of workflow files have .yml extension
| REGEX='^([a-z]+)(\([^)]+\))?(!)?: .+' | ||
| if [[ "$PR_TITLE" =~ $REGEX ]]; then | ||
| TYPE="${BASH_REMATCH[1]}" | ||
| HAS_BREAKING_MARKER="${BASH_REMATCH[3]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems conventional commits also allow you to specify breaking changes by including the BREAKING CHANGES token in the footer of the commit
https://www.conventionalcommits.org/en/v1.0.0/#specification
Shall we take it into account?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use a parser like https://www.npmjs.com/package/conventional-commits-parser?
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.