-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 #136209 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update r? `@Manishearth` Quite a bit late, as I was on vacation and then we had an issue in MacOS CI after the sync.
- Loading branch information
Showing
273 changed files
with
5,679 additions
and
795 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Clippy changelog check | ||
|
||
on: | ||
merge_group: | ||
pull_request: | ||
types: [opened, reopened, synchronize, edited] | ||
|
||
concurrency: | ||
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR. | ||
# If the push is not attached to a PR, we will cancel all builds on the same branch. | ||
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
# Run | ||
- name: Check Changelog | ||
if: ${{ github.event_name == 'pull_request' }} | ||
run: | | ||
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR_NUMBER" | \ | ||
python -c "import sys, json; print(json.load(sys.stdin)['body'])") | ||
output=$(awk '/^changelog:\s*\S/ && !/changelog: \[.*\]: your change/' <<< "$body" | sed "s/changelog:\s*//g") | ||
if [ -z "$output" ]; then | ||
echo "ERROR: pull request message must contain 'changelog: ...' with your changelog. Please add it." | ||
exit 1 | ||
else | ||
echo "changelog: $output" | ||
fi | ||
env: | ||
PYTHONIOENCODING: 'utf-8' | ||
PR_NUMBER: '${{ github.event.number }}' | ||
|
||
# We need to have the "conclusion" job also on PR CI, to make it possible | ||
# to add PRs to a merge queue. | ||
conclusion_changelog: | ||
needs: [ changelog ] | ||
# We need to ensure this job does *not* get skipped if its dependencies fail, | ||
# because a skipped job is considered a success by GitHub. So we have to | ||
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run | ||
# when the workflow is canceled manually. | ||
# | ||
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB! | ||
if: ${{ !cancelled() }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Manually check the status of all dependencies. `if: failure()` does not work. | ||
- name: Conclusion | ||
run: | | ||
# Print the dependent jobs to see them in the CI log | ||
jq -C <<< '${{ toJson(needs) }}' | ||
# Check if all jobs that we depend on (in the needs array) were successful. | ||
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' |
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
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.