Skip to content
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

Get Buffy configured properly #1

Open
deniederhut opened this issue Mar 16, 2021 · 15 comments
Open

Get Buffy configured properly #1

deniederhut opened this issue Mar 16, 2021 · 15 comments

Comments

@deniederhut
Copy link
Member

Hey @xuanxu! So I've been fumbling around with the code and configurations, and we are at the point where the bot (@scoobies) responds to hello and help on this ticket here: scipy-conference/scipy_proceedings_test#1. Currently, any response that is specified as "editor only" is failing with an authorization error:

2021-03-16T00:18:59.449788+00:00 app[web.1]: 2021-03-16 00:18:59 - Octokit::Unauthorized - GET https://api.github.com/orgs/scipy-conference/teams?per_page=100: 401 - Requires authentication // See: https://docs.github.com/rest/reference/teams#list-teams:

Possibly this is due to a misspecification of the teams? I don't know where one can find the GitHub ID, so I used the name of the team here:

editors: scipy-conference/proceedings
.

@xuanxu
Copy link

xuanxu commented Mar 16, 2021

@deniederhut It looks like the bot is not allowed to query for teams info, did you add it as admin to the organization? it should be an admin in scipy-conference.

@deniederhut
Copy link
Member Author

Oh, no I have not added it as an admin, but I would also rather not give it privileges that are that high. Is there another way we can specify who the editors are? E.g. directly in the config?

@xuanxu
Copy link

xuanxu commented Mar 16, 2021

Right now the editors can only be added in the config as a team. And for some of the other actions the bot can perform GitHub requires admin privileges in the organization (adding reviewers as collaborators to the repo, invite, ...)

@xuanxu
Copy link

xuanxu commented Mar 16, 2021

(I've just added to my backlog to allow restricting access to responders to individual github users)

@deniederhut
Copy link
Member Author

Awesome -- thanks!

And for some of the other actions the bot can perform GitHub requires admin privileges in the organization (adding reviewers as collaborators to the repo, invite, ...)

So I think that our workflow shouldn't need to use those? Anyone who isn't an editor opens paper PRs from their own forks of the scipy_proceedings repo. Which conveniently brings me to my next question.

In SciPy's paper review workflow, all of the discussion happens in PR submission, comments, and reviews. If I update the webhook to send PR updates to Buffy, will Buffy respond to them? Or does it filter for Issue updates specifically and/or have logic that assumes it will be responding via the issues API?

Sorry for all the questions -- I'm not very familiar with Ruby or the Github API, so I'm sort of double blind here.

(that was an editor pun 😎)

@xuanxu
Copy link

xuanxu commented Mar 17, 2021

In SciPy's paper review workflow, all of the discussion happens in PR submission, comments, and reviews. If I update the webhook to send PR updates to Buffy, will Buffy respond to them? Or does it filter for Issue updates specifically and/or have logic that assumes it will be responding via the issues API?

Good question. The code currently only listens to issue events, but it should work in PRs with no changes, as PRs are internally a special type of issues. Please try it.
I'll take a look at the GH API to check if there is any conflict with acting on PRs as issues (maybe speed/performance as it involves redirections).

@xuanxu
Copy link

xuanxu commented Mar 17, 2021

So I think that our workflow shouldn't need to use those? Anyone who isn't an editor opens paper PRs from their own forks of the scipy_proceedings repo. Which conveniently brings me to my next question.

If you don't need to invite anyone as a collaborator I think you don't need the admin privileges (once the editors' GH handles can be specified in the config directly).

@deniederhut
Copy link
Member Author

PRs are internally a special type of issues. Please try it.

Okay cool. I'll give that a shot tonight. Thanks!

@xuanxu
Copy link

xuanxu commented Mar 23, 2021

Buffy allows now to create teams using a list of users:

teams:
    editors:
        - user1
        - user2

If you update the main branch and rebase the scipy you should be good to go.

@deniederhut
Copy link
Member Author

Wow that was fast! I'll give it a shot and let you know how it goes!

@xuanxu
Copy link

xuanxu commented Mar 25, 2021

BTW, I've added a short guide on "how to add custom responders" to the docs:
https://buffy.readthedocs.io/en/latest/custom_responder.html

@deniederhut
Copy link
Member Author

Sweet, it looks like it's working as intended! And thanks for the additional docs -- I'm sure I'll have a bunch of questions for you in like... a week or so.

@deniederhut
Copy link
Member Author

Hey @xuanxu ! Long time no chat!

So I think we've gotten most of the responders we want to have for this year up and running, including triggering a paper build on our remote build server and checking the status. The one thing left on our to-do list is assigning paper reviewers. I gave it a shot here (scipy-conference/scipy_proceedings_test#5 (comment)) and it looks like the bot can assign people to PRs, but not request reviews on PRs. Is there something I need to do to get that command working?

@xuanxu
Copy link

xuanxu commented May 25, 2021 via email

@deniederhut
Copy link
Member Author

Ah, okay. I think I had assumed that this would request a review from that user, but listing them in the opening comment works too. Thanks so much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants