-
Notifications
You must be signed in to change notification settings - Fork 16
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
Automatically approve, merge, and score PRs containing only changes to plugins #108
Merged
Conversation
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
kvfairchild
changed the title
Automatically merge, score
Automatically approve, merge, and score PRs containing only changes to plugins
Nov 9, 2022
kvfairchild
added
the
automerge
PR will be automatically approved and merged if it includes only changes to plugins
label
Nov 9, 2022
…uage into kvf/pr_to_score
mschrimpf
reviewed
Jan 11, 2023
kvfairchild
commented
Apr 3, 2023
Co-authored-by: Martin Schrimpf <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
…uage into kvf/pr_to_score
This was referenced Apr 27, 2023
kvfairchild
added a commit
that referenced
this pull request
Apr 29, 2023
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.
Adds two GitHub Actions workflows and supporting infrastructure to
automerge_plugin-only_prs.yml
):automerge
orautomerge-web
(all submissions originating frombrain-score.org
are tagged withautomerge-web
)/benchmarks
,/models
,/metrics
,/data
)This workflow is triggered on a PR by the completion of CI checks OR by the addition of a label. It first runs an action to confirm that the PR is labeled with either
automerge
orautomerge-web
; if so, it then checks Travis status and sets thetravisok
flag to one ofTrue
(Travis completed successfully),Wait
(Travis has not finished running), orFail
(Travis completed with errors).If
travisok
isWait
: The workflow exits and will be triggered again on CI check completion. (Rather than only triggering the workflow on check completion, this status accommodates the case where a user has waited for CI checks to complete before adding theautomerge
label).True
: An action is run to identify all files changed by the PR. If no files have been touched outside of child directories of plugin directories (/benchmarks
,/models
,/metrics
,/data
), the PR is automatically approved and merged tomain
.False
: If the PR is tagged withautomerge-web
, the user ID associated with the Brain-Score account of the submitter is parsed from the PR title and passed to an action that 1) returns the email address associated with that account and 2) sends an email to that address that includes a link to the PR and requests that the test failures be addressed.main
that include changes to a benchmark or model directory (score_new_plugins.yml
).This workflow is triggered on any merge to
main
. It first runs an action to identify all files changed by the PR, parses those files with a Python script (parse_changed_files.py
) to extract any benchmark and model directories included in those changes, and passes the file names of those directories to Jenkins for scoring along with:author_email
: the email address associated with the GitHub account of the PR author.user_id
: if the PR is submitted viabrain-score.org
, the user ID associated with the Brain-Score account of the submitter is included in, and extracted from, the PR title.domain
: the domain associated with the submitted plugins; this field islanguage
by default for all submissions to this repository.public
: whether the plugin is public or private; currently this field isTrue
for all submissions by default, but this accommodates plans to support private plugins in the future.competition
: currentlyNone
by default, but in the future this will allow PRs to be tagged with the name of a competition and filed accordingly.model_type
:artificialsubject
by default for all submissions to this repository.