xtask-unpublished: output a markdown table#12085
Merged
bors merged 3 commits intorust-lang:masterfrom May 5, 2023
Merged
Conversation
Collaborator
|
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
Member
Author
It works! See https://github.com/rust-lang/cargo/actions/runs/4891160691/jobs/8731327847. |
5a0e91b to
78730a6
Compare
ffa4702 to
01b3f1e
Compare
Member
Author
|
@bors try |
Contributor
bors
added a commit
that referenced
this pull request
May 5, 2023
ci: check if a crate needs a version bump when source files change
Contributor
|
💥 Test timed out |
epage
reviewed
May 5, 2023
epage
reviewed
May 5, 2023
epage
reviewed
May 5, 2023
epage
reviewed
May 5, 2023
epage
reviewed
May 5, 2023
epage
reviewed
May 5, 2023
ci/validate-version-bump.sh
Outdated
Comment on lines
+12
to
+17
| set -euo pipefail | ||
|
|
||
| # When `BASE_SHA` is missing, we assume it is from bors merge commit, | ||
| # so `HEAD~` should find the previous commit on master branch. | ||
| base_sha=$(git rev-parse "${BASE_SHA:-HEAD~}") | ||
| commit_sha=$(git rev-parse "${COMMIT_SHA:-HEAD}") |
Contributor
There was a problem hiding this comment.
I was assuming this would be written as an xtask, rather than a shell script wrapping one. It'd make it easier to identify changes that way.
These tree packages are considered to be published something. To reduce the logic of xtask-unpubilshed, let's flag them false for now. We can always set it `true` when needed.
01b3f1e to
f20c9ae
Compare
Member
Author
|
r? @epage Tweaked it a bit. Thanks for the review! |
f20c9ae to
8620f5a
Compare
Contributor
|
@bors r+ |
Contributor
Contributor
epage
added a commit
to epage/cargo
that referenced
this pull request
May 5, 2023
This will report what commits affect each publishable package and serves as an alternative to rust-lang#12085. CI can run this as `cargo changes HEAD~ HEAD^2` and that will capture all of the commits within the PR (this is the range I used in `committed`). There is still work needed to integrate this with an action; this is just a rough base-line implementation. I originally tried to use `cargo package --list` to determine what files belong to what packages but that was taking too long for some reason (it works well in `cargo release` for my crates). We can either look into that in the future or do our own heuristics to filter out content.
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 5, 2023
Update cargo 10 commits in ac84010322a31f4a581dafe26258aa4ac8dea9cd..569b648b5831ae8a515e90c80843a5287c3304ef 2023-05-02 13:41:16 +0000 to 2023-05-05 15:49:44 +0000 - xtask-unpublished: output a markdown table (rust-lang/cargo#12085) - fix: hack around `libsysroot` instead of `libtest` (rust-lang/cargo#12088) - Optimize usage under rustup. (rust-lang/cargo#11917) - Update lock to normalize `home` dep (rust-lang/cargo#12084) - fix: doc-test failures (rust-lang/cargo#12055) - feat(cargo-metadata): add `workspace_default_members` (rust-lang/cargo#11978) - doc: clarify implications of `cargo-yank` (rust-lang/cargo#11862) - chore: Use `[workspace.dependencies]` (rust-lang/cargo#12057) - support for shallow clones and fetches with `gitoxide` (rust-lang/cargo#11840) - Build by PackageIdSpec, not name, to avoid ambiguity (rust-lang/cargo#12015) r? `@ghost`
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR try to resolve?
Part of #12033
The purpose of these changes is to make sure that every subcrate gets a version bump if their source files change.This turns out to be adding a table output for xtask-unpublished. Will address CI issue later on.
How should we test and review this PR?
This extends
xtask-unpublishedto--packageflagThis also marks
capturecargo-test-support, andcargo-test-marcocrates aspublish = false.To review, you may want to
cargo unpublishedand check the output correctness.Additional information
Initially, I was going to run
gh pr comment --body <comment>to write a comment on the pull request. I had a basic example here. However, it seems to have some safety concerns 1 — we may grant too many permissions to a malicious PR author to mess up our pull requests.I stopped to provide this new CI job only. No any new GitHub Action permission required.
If you got a good idea to post a comment without sacrificing CI security and complexity, I am happy to know!
Footnotes
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ ↩