You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to be able to run simple cleanup scripts against PRs without having to use the command line.
Proposed Solution
We should allow maintainers to make "magic comments", similar to how the bots work in conda-forge.
A repo could provide a set of comments that are applicable, and the script that should be run for the given comment.
The bot would look for a matching comment on an issue_comment event, and if the user has an author_association of OWNER, COLLABORATOR, or MEMBER, it will do the following:
Post a comment to the issue signifying that the script is running
If the user is not authorized, post an issue comment and bail
Check out the branch in the pull request in a temporary directory
Run the appropriate script (or list of scripts)
Commit the message using its own Git credentials
Push the commit to the PR
Delete the checkout
We could decide that some common phrases are always available, like @jupyterlab-bot, please run pre-commit could always trigger a pre-commit run --all-files with no configuration necessary in the repo.
Another option is to have a @jupyterlab-bot, please auto format, and have that by default run pre-commit run --all-files, but allow config to override.
Note: get a issue_comment event for testing, add a webhook to a repo, selecting "Issue comments". Add a comment to an issue, then grab the payload from the resulting event.
Problem
We would like to be able to run simple cleanup scripts against PRs without having to use the command line.
Proposed Solution
We should allow maintainers to make "magic comments", similar to how the bots work in
conda-forge
.A repo could provide a set of comments that are applicable, and the script that should be run for the given comment.
The bot would look for a matching comment on an
issue_comment
event, and if the user has anauthor_association
ofOWNER
,COLLABORATOR
, orMEMBER
, it will do the following:We could decide that some common phrases are always available, like
@jupyterlab-bot, please run pre-commit
could always trigger apre-commit run --all-files
with no configuration necessary in the repo.Another option is to have a
@jupyterlab-bot, please auto format
, and have that by default runpre-commit run --all-files
, but allow config to override.Note: get a
issue_comment
event for testing, add a webhook to a repo, selecting "Issue comments". Add a comment to an issue, then grab the payload from the resulting event.Additional context
We added a limited version of this in jupyterlab/maintainer-tools#39, but it would be cleaner to do it here.
The text was updated successfully, but these errors were encountered: