forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#136002 - joboet:rollup-f7cf3xs, r=joboet
Rollup of 6 pull requests Successful merges: - rust-lang#135728 (document order of items in iterator from drain) - rust-lang#135829 (Rustc dev guide subtree update) - rust-lang#135886 (Document purpose of closure in from_fn.rs more clearly) - rust-lang#135977 (Fix `FormattingOptions` instantiation with `Default`) - rust-lang#135983 (Doc difference between extend and extend_from_slice) - rust-lang#135985 (Rename test to `unresolvable-upvar-issue-87987.rs` and add some notes) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
39 changed files
with
253 additions
and
154 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: rustc-pull | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# Run at 04:00 UTC every Monday | ||
- cron: '0 4 * * 1' | ||
|
||
jobs: | ||
pull: | ||
if: github.repository == 'rust-lang/rustc-dev-guide' | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pr_url: ${{ steps.update-pr.outputs.pr_url }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# We need the full history for josh to work | ||
fetch-depth: '0' | ||
- name: Install stable Rust toolchain | ||
run: rustup update stable | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: "josh-sync" | ||
# Cache the josh directory with checked out rustc | ||
cache-directories: "/home/runner/.cache/rustc-dev-guide-josh" | ||
- name: Install josh | ||
run: RUSTFLAGS="--cap-lints warn" cargo +stable install josh-proxy --git https://github.com/josh-project/josh --tag r24.10.04 | ||
- name: Setup bot git name and email | ||
run: | | ||
git config --global user.name 'The rustc-dev-guide Cronjob Bot' | ||
git config --global user.email 'github-actions@github.com' | ||
- name: Perform rustc-pull | ||
run: cargo run --manifest-path josh-sync/Cargo.toml -- rustc-pull | ||
- name: Push changes to a branch | ||
run: | | ||
# Update a sticky branch that is used only for rustc pulls | ||
BRANCH="rustc-pull" | ||
git switch -c $BRANCH | ||
git push -u origin $BRANCH --force | ||
- name: Create pull request | ||
id: update-pr | ||
run: | | ||
# Check if an open pull request for an rustc pull update already exists | ||
# If it does, the previous push has just updated it | ||
# If not, we create it now | ||
RESULT=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | length' --json title` | ||
if [[ "$RESULT" -eq 0 ]]; then | ||
echo "Creating new pull request" | ||
PR_URL=gh pr create -B master --title 'Rustc pull update' --body 'Latest update from rustc.' | ||
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT | ||
else | ||
PR_URL=gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | .[0].url' --json url,title | ||
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
send-zulip-message: | ||
needs: [pull] | ||
if: ${{ !cancelled() }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Compute message | ||
id: message | ||
run: | | ||
if [ "${{ needs.pull.result }}" == "failure" ]; | ||
then | ||
WORKFLOW_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
echo "message=Rustc pull sync failed. Check out the [workflow URL]($WORKFLOW_URL)." >> $GITHUB_OUTPUT | ||
else | ||
echo "message=Rustc pull sync succeeded. Check out the [PR](${{ needs.pull.outputs.pr_url }})." >> $GITHUB_OUTPUT | ||
fi | ||
- name: Send a Zulip message about updated PR | ||
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5 | ||
with: | ||
api-key: ${{ secrets.ZULIP_API_TOKEN }} | ||
email: "rustc-dev-guide-gha-notif-bot@rust-lang.zulipchat.com" | ||
organization-url: "https://rust-lang.zulipchat.com" | ||
to: 196385 | ||
type: "stream" | ||
topic: "Subtree sync automation" | ||
content: ${{ steps.message.outputs.message }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ ci/date-check/target/ | |
|
||
# Generated by check-in.sh | ||
pulls.json | ||
|
||
josh-sync/target |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dcfa38fe234de9304169afc6638e81d0dd222c06 | ||
ecda83b30f0f68cf5692855dddc0bc38ee8863fc |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.