-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[GitHub][workflows] Add buildbot information comment to first merged PR from a new contributor #78292
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
Merged
Merged
[GitHub][workflows] Add buildbot information comment to first merged PR from a new contributor #78292
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
20822b4
[GitHub][workflows] Add buildbot information comment to first merged …
DavidSpickett cffa506
use sparse checkout
DavidSpickett dac42b9
Missing space.
DavidSpickett 97d302e
Always checkout main not the PR itself.
DavidSpickett cda94ea
Run with python3 instead.
DavidSpickett 07dd877
* suggest console view to track builds
DavidSpickett 9cf9c0f
* "may" get emails, so we don't have to list all the possible ways
DavidSpickett 7f9f76f
Shuffling things around.
DavidSpickett a6ae125
Link to the new info section
DavidSpickett d9c09b0
note strange line breaking
DavidSpickett 82c3959
Merge branch 'main' into new-user-merge
DavidSpickett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "Add buildbot information to first PRs from new contributors" | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
# It's safe to use pull_request_target here, because we aren't checking out | ||
# code from the pull request branch. | ||
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
pull_request_target: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
buildbot_comment: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
if: >- | ||
(github.repository == 'llvm/llvm-project') && | ||
(github.event.pull_request.merged == true) | ||
steps: | ||
- name: Checkout Automation Script | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: llvm/utils/git/ | ||
ref: main | ||
|
||
- name: Setup Automation Script | ||
working-directory: ./llvm/utils/git/ | ||
run: | | ||
pip install -r requirements.txt | ||
|
||
- name: Add Buildbot information comment | ||
working-directory: ./llvm/utils/git/ | ||
run: | | ||
python3 ./github-automation.py \ | ||
--token '${{ secrets.GITHUB_TOKEN }}' \ | ||
pr-buildbot-information \ | ||
--issue-number "${{ github.event.pull_request.number }}" \ | ||
--author "${{ github.event.pull_request.user.login }}" |
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
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.
Uh oh!
There was an error while loading. Please reload this page.