Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d128c07
ci: add breaking change detector
rluvaton Apr 9, 2026
968fc57
ci: run manually for now
rluvaton Apr 9, 2026
3500fee
add to existing ci job so i can test the workflow
rluvaton Apr 9, 2026
b0f7cdf
add permission
rluvaton Apr 9, 2026
dcb3cfc
try running
rluvaton Apr 9, 2026
8ec278a
fetch main
rluvaton Apr 9, 2026
e15d6a7
run on all branches
rluvaton Apr 9, 2026
129e180
run on changed crates
rluvaton Apr 9, 2026
0a863bd
only if changed
rluvaton Apr 9, 2026
b3b6dde
compare against last commit
rluvaton Apr 9, 2026
95189de
test: add temporary public function for semver breaking change testing
rluvaton Apr 9, 2026
97ee5b5
test: remove public function to trigger semver breaking change
rluvaton Apr 9, 2026
d5b1985
fix
rluvaton Apr 9, 2026
910501c
test: re-add temporary public function for semver testing
rluvaton Apr 9, 2026
f40c07a
test: remove public function to trigger semver breaking change
rluvaton Apr 9, 2026
65779f4
fix
rluvaton Apr 9, 2026
6de3a14
test: re-add temporary public function for semver testing
rluvaton Apr 9, 2026
1bd00c2
test: remove public function to trigger semver breaking change
rluvaton Apr 9, 2026
b3bf244
revert
rluvaton Apr 9, 2026
5286bab
Merge branch 'main' into automate-semver-breaking-api
rluvaton Apr 9, 2026
10847a0
add coments
rluvaton Apr 9, 2026
6d27da4
Merge remote-tracking branch 'origin/automate-semver-breaking-api' in…
rluvaton Apr 9, 2026
a903cae
add license
rluvaton Apr 9, 2026
83a2f39
Merge branch 'main' into automate-semver-breaking-api
rluvaton Apr 9, 2026
8d99fba
use script instead
rluvaton Apr 9, 2026
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
67 changes: 67 additions & 0 deletions .github/workflows/breaking_changes_detector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "Detect breaking changes"

on:
pull_request:
branches:
- main

jobs:
check-semver:
name: Check semver
runs-on: ubuntu-latest
outputs:
logs: ${{ steps.check_semver.outputs.logs }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-semver-checks
run: cargo install cargo-semver-checks

- name: Run cargo-semver-checks
id: check_semver
run: |
set +e
cargo semver-checks --baseline-rev origin/main 2>&1 | tee /tmp/semver-output.txt
EXIT_CODE=${PIPESTATUS[0]}
OUTPUT=$(sed 's/\x1b\[[0-9;]*m//g' /tmp/semver-output.txt)
echo "logs<<EOF" >> "$GITHUB_OUTPUT"
echo "$OUTPUT" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
exit $EXIT_CODE

comment-on-pr:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: Comment on pull request
runs-on: ubuntu-latest
needs: check-semver
if: always()
permissions:
pull-requests: write
steps:
- name: Comment
if: ${{ needs.check-semver.result != 'success' }}
uses: marocchino/sticky-pull-request-comment@v2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought in general the ASF CI jobs are supposed to avoid using non github actions (unless it is on the whitelist) -- so I am surprised this works.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

did not test the sticky pull request itself, just tested the breaking change detector

with:
header: pr-semver-check-error
message: |
Thank you for opening this pull request!

Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes made since the last release.

Details:

```
${{ needs.check-semver.outputs.logs }}
```

- name: Delete comment
if: ${{ needs.check-semver.result == 'success' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-semver-check-error
delete: true
61 changes: 61 additions & 0 deletions .github/workflows/large_files.yml
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added to here so I can test it

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,67 @@
merge_group:

jobs:

check-semver:
name: Check semver
runs-on: ubuntu-latest
outputs:
logs: ${{ steps.check_semver.outputs.logs }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-semver-checks
run: cargo install cargo-semver-checks

- name: Run cargo-semver-checks
id: check_semver
run: |
set +e
cargo semver-checks --baseline-rev origin/main 2>&1 | tee /tmp/semver-output.txt
EXIT_CODE=${PIPESTATUS[0]}
OUTPUT=$(sed 's/\x1b\[[0-9;]*m//g' /tmp/semver-output.txt)
echo "logs<<EOF" >> "$GITHUB_OUTPUT"
echo "$OUTPUT" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
exit $EXIT_CODE

comment-on-pr:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
name: Comment on pull request
runs-on: ubuntu-latest
needs: check-semver
if: always()
permissions:
pull-requests: write
steps:
- name: Comment
if: ${{ needs.check-semver.result != 'success' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-semver-check-error
message: |
Thank you for opening this pull request!

Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes made since the last release.

Details:

```
${{ needs.check-semver.outputs.logs }}
```

- name: Delete comment
if: ${{ needs.check-semver.result == 'success' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-semver-check-error
delete: true

check-files:
runs-on: ubuntu-slim
steps:
Expand Down
Loading