-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: react with a rocket * fix: try not equal null * fix: wrong path * need conda env * try a new commit * fix: use it as an issue
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import os | ||
|
||
import click | ||
import github | ||
|
||
|
||
@click.command() | ||
@click.option("--full-name", required=True, type=str) | ||
@click.option("--pr-number", required=True, type=int) | ||
@click.option("--comment-id", required=True, type=int) | ||
def main(full_name, pr_number, comment_id): | ||
gh = github.Github(auth=github.Auth.Token(os.environ["GH_TOKEN"])) | ||
repo = gh.get_repo(full_name) | ||
pr_as_issue = repo.get_pull(pr_number).as_issue() | ||
comment = pr_as_issue.get_comment(comment_id) | ||
comment.create_reaction("rocket") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |