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

Install github-comment-ops #3060

Closed
timja opened this issue Jul 20, 2022 · 29 comments
Closed

Install github-comment-ops #3060

timja opened this issue Jul 20, 2022 · 29 comments
Assignees
Labels
enhancement New feature or request github

Comments

@timja
Copy link
Member

timja commented Jul 20, 2022

Service(s)

Other

Summary

Hi

I've made a tool https://github.com/timja/github-comment-ops that can allow managing issues and pull requests by users without write access.

It has features like:

  • label
  • request reviews
  • close / reopen
  • transfer issues

See the README for all features and required permissions.

It is powered by GitHub apps and is multi-tenanted so will work for any organizations that it's installed to, (i.e. only one deployment is needed).

Could we deploy this please?

I've created a helm chart for it:
https://github.com/timja/github-comment-ops/tree/main/charts/github-comment-ops

Let me know of any issues / feedback, I'd be interested in someone else doing the setup to get any feedback from something I've missed

Reproduction steps

No response

@timja timja added the triage Incoming issues that need review label Jul 20, 2022
@timja
Copy link
Member Author

timja commented Jul 20, 2022

FYI @basil / @jglick you may be interested

@lemeurherve
Copy link
Member

Who can use these commands?

@timja
Copy link
Member Author

timja commented Jul 20, 2022

Anyone, they can't do anything harmful, similar to in Jira (it doesn't go quite as far though, i.e. no editing description) how anyone could update basically anything.

I have created an issue to allow restricting to certain people, but I don't think required for this (happy to be persuaded):
timja/github-comment-ops#10

@jglick
Copy link

jglick commented Jul 20, 2022

close / reopen

Limited to issues for non-members, I would hope, and not pull requests.

@NotMyFault
Copy link
Member

Are you looking forward to enable that on the jenkinsci org?

@timja
Copy link
Member Author

timja commented Jul 20, 2022

close / reopen

Limited to issues for non-members, I would hope, and not pull requests.

Yes I only implemented it for issues:
https://github.com/timja/github-comment-ops/blob/main/app/github.js#L367-L392

@lemeurherve lemeurherve self-assigned this Jul 20, 2022
@lemeurherve lemeurherve added github and removed triage Incoming issues that need review labels Jul 20, 2022
@timja
Copy link
Member Author

timja commented Jul 20, 2022

Tested to make sure:
timja-org/test-product-infra#31

image

It's not handled properly as there's a stacktrace because it still tries to close it, but it only has the code for issues

@lemeurherve
Copy link
Member

timja-org/test-product-infra#31

Private repo? Got a "page not found"

@timja
Copy link
Member Author

timja commented Jul 20, 2022

Fixed

@lemeurherve
Copy link
Member

lemeurherve commented Jul 20, 2022

Presented during the last UX SIG meeting: https://www.youtube.com/watch?v=t1BSLRPNeQ4&t=2060s

@lemeurherve
Copy link
Member

lemeurherve commented Jul 21, 2022

GitHub App created: https://github.com/apps/comment-ops-bot

Permissions:

  • Issues: Read & Write
  • Pull requests: Read & Write
  • Organizations.Members: Read only

lemeurherve pushed a commit to lemeurherve/kubernetes-management that referenced this issue Jul 21, 2022
lemeurherve added a commit to jenkins-infra/kubernetes-management that referenced this issue Jul 21, 2022
@lemeurherve
Copy link
Member

lemeurherve commented Jul 21, 2022

DNS record added:

Details image

@lemeurherve
Copy link
Member

lemeurherve commented Jul 21, 2022

GitHub App webhook configured to https://webhook-github-comment-ops.jenkins.io/api/github/webhooks

Details image

@lemeurherve
Copy link
Member

lemeurherve commented Jul 21, 2022

Added missing subscription to "issue comment" and "issue" events in the GitHub App settings:

Details image

@lemeurherve
Copy link
Member

lemeurherve commented Jul 21, 2022

It's now working in jenkinsci organization 🎉

Example: jenkinsci/jenkins-infra-test-plugin#42

image

@timja
Copy link
Member Author

timja commented Jul 21, 2022

@timja
Copy link
Member Author

timja commented Jul 21, 2022

@lemeurherve did you want to raise an issue with any confusion you had or improvements? or PR the README directly?


Thanks for sorting so quickly!

@lemeurherve
Copy link
Member

lemeurherve commented Jul 21, 2022

I'll prepare a PR later :)

Some points I'd add:

  • helm chart URL
  • subscription to "issue comment" (GitHub App settings)
  • complete URL as webhook path (GitHub App settings)

@jglick
Copy link

jglick commented Jul 21, 2022

There is a bit of a discoverability problem here. How are users supposed to remember the list of supported commands, or find out that the whole system exists to begin with?

@lemeurherve
Copy link
Member

How are users supposed to remember the list of supported commands

I've suggested timja/github-comment-ops#36 as a first improvement.

find out that the whole system exists to begin with?

Some suggestions:

I fear some/most won't discover this functionality, but I think the curious/frequent contributors will quickly notice these comments and what they do.

@lemeurherve
Copy link
Member

lemeurherve commented Jul 21, 2022

Also, a link/quick explanation could be added as comment in the issue and pull request templates

  • of the jenkinsci/.github repo
  • in the major jenkinsci repositories

Another (noisy) possibility: make the GitHub App comments on every new issue/PR with an "help" message.

@timja
Copy link
Member Author

timja commented Jul 21, 2022

I plan to announce, and update the core PR template.

I was planning to hold announcing till I fixed some of these issues that people have raised, but can also announce later on today if people prefer that

@jglick
Copy link

jglick commented Jul 21, 2022

Oh a question about /reviewer. AFAIK GH actively blocks you from requesting a review from someone who is not a member of some group defined on the repo. (Even if the repo is public, and their only permission is read, which is otherwise redundant. And even though anyone can review any public PR without write access, including “suggesting” rather than “requesting” changes.) So this could be used by someone with no role in @jenkinsci but only to request review from someone who does have a role, not some other rando, right?

@timja
Copy link
Member Author

timja commented Jul 21, 2022

Yes correct

@lemeurherve
Copy link
Member

/label enhancement

@comment-ops-bot comment-ops-bot bot added the enhancement New feature or request label Jul 22, 2022
@lemeurherve
Copy link
Member

GitHub App installed on jenkins-infra org too 🙂

@timja
Copy link
Member Author

timja commented Jul 22, 2022

and on https://github.com/timja/github-comment-ops

@timja
Copy link
Member Author

timja commented Jul 25, 2022

At Daniel's request I've temporarily limited the repositories in the jenkinsci org to:

  • jenkins
  • design-library-plugin
  • jenkins-infra-test-plugin

This is to gather feedback and in a couple of weeks if there's no objections we can enable globally.

There is a jenkinsci developer thread at: https://groups.google.com/g/jenkinsci-dev/c/sE7mH7hUZSY

@lemeurherve
Copy link
Member

I've done the same on jenkins-infra organization, it's now activated only on https://github.com/jenkins-infra/helpdesk

I'll open an issue to gather the use cases for jenkins-infra and the repositories needing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request github
Projects
None yet
Development

No branches or pull requests

4 participants