-
Notifications
You must be signed in to change notification settings - Fork 16
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: main
Are you sure you want to change the base?
Conversation
BenchmarksComparisonBenchmark execution time: 2026-01-09 12:11:56 Comparing candidate commit 4ff4f16 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 2 unstable metrics. 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 @@
## main #1414 +/- ##
=======================================
Coverage 71.22% 71.22%
=======================================
Files 411 411
Lines 65788 65788
=======================================
Hits 46860 46860
Misses 18928 18928
🚀 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
|
9a57b41 to
3c6890c
Compare
…changes in the PR.
3c6890c to
4ff4f16
Compare
| while IFS= read -r crate_path; do | ||
| # Skip empty lines | ||
| if [[ -z "$crate_path" ]]; then | ||
| continue | ||
| fi | ||
|
|
||
| # Check if any files in this crate directory changed | ||
| if echo "$CHANGED_FILES" | grep -q "^${crate_path}/"; then | ||
| CRATE_MANIFEST="${crate_path}/Cargo.toml" | ||
|
|
||
| # Skip if Cargo.toml doesn't exist | ||
| if [[ ! -f "$CRATE_MANIFEST" ]]; then | ||
| continue | ||
| fi | ||
|
|
||
| # Check if crate has "publish = false" | ||
| if grep -q "^publish = false" "$CRATE_MANIFEST"; then | ||
| echo "Skipping unpublished crate: $crate_path" | ||
| continue | ||
| fi | ||
|
|
||
| # Extract crate name | ||
| CRATE_NAME=$(grep "^name = " "$CRATE_MANIFEST" | head -1 | sed 's/name = "\(.*\)"/\1/') | ||
|
|
||
| if [[ -n "$CRATE_NAME" ]]; then | ||
| echo "Detected change in published crate: $CRATE_NAME ($crate_path)" | ||
| CHANGED_CRATES+=("$CRATE_NAME") | ||
| fi | ||
| fi | ||
| done < <(sed -n 's/^ "\(.*\)",\?$/\1/p' Cargo.toml) |
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.
I think this whole section would be less brittle if you just parsed the output of cargo metadata
A small jq script like this to grab the paths and names works for instance
cargo metadata | jq '.workspace_default_members as $members
| .packages
| map(
select(.id | IN($members[]))
| select(.publish != null)
| {name, path: .manifest_path | rtrimstr("/Cargo.toml")}
)'
| - name: Detect changed published crates | ||
| id: detect | ||
| run: | | ||
| set -euo pipefail |
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.
I think it'd be better to have the scripts in files in the scripts/ folders instead of inline in the yaml
What does this PR do?
This PR introduces a new workflow (pr-title-semver-check.yml) that automatically:
Validation Rules
The workflow enforces the following mappings between conventional commit types and API changes:
Technical Details
The workflow consists of three jobs:
Benefits