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

RFC: Process Github issue_comment events to support adhoc task creation #168

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

bhearsum
Copy link
Contributor

No description provided.

@bhearsum bhearsum force-pushed the test-on-pr-comments branch from ed56d2c to 8a1025a Compare April 14, 2021 20:22
@bhearsum bhearsum force-pushed the test-on-pr-comments branch from 8a1025a to e6d1059 Compare April 14, 2021 20:54
@djmitche
Copy link
Contributor

Another thing to consider here is that we currently don't subscribe to issue-comment events. https://docs.taskcluster.net/docs/manual/deploying/github describes what we do subscribe to, and the "Pull Request" option has the following help text:

Pull request opened, closed, reopened, edited, assigned, unassigned, review requested, review request removed, labeled, unlabeled, synchronized, ready for review, converted to draft, locked, unlocked, auto merge enabled, auto merge disabled, milestoned, or demilestoned.

So, I think that listening for comment events will require changing that setting in the app, and last time we tried this that meant GitHub emailed all app users and asked them to re-authorize the app before allowing it to subscribe to those events. The app continues to work without the events until that re-authorization occurs. So, not a big problem, but something to be aware of for deployers.

@bhearsum
Copy link
Contributor Author

So, I think that listening for comment events will require changing that setting in the app

This was my read, too.

and last time we tried this that meant GitHub emailed all app users and asked them to re-authorize the app before allowing it to subscribe to those events. The app continues to work without the events until that re-authorization occurs. So, not a big problem, but something to be aware of for deployers.

Good to know! Once this is available, it's a pretty big carrot so I suspect it'll be easy to get folks to re-authorize to gain access to the feature.

@hwine
Copy link

hwine commented Apr 26, 2021

FYI: see changes to how GitHub is addressing this issue

[update 2021-05-07] This works differently than I thought at first -- this is a DoS via excessive PR prevention. Even when approved, PRs from forks do not have access to workflow secrets. The links on this page clarify that point.

@bhearsum
Copy link
Contributor Author

FYI: see changes to how GitHub is addressing this issue

I saw that! It's a neat idea, and actually a bit better than what's proposed here, since it learns who is trusted over time. This proposal would require approval for every PR for the same contributor. We could extend to do something nicer like that later, I suspect.

@hwine
Copy link

hwine commented Apr 27, 2021

This proposal would require approval for every PR for the same contributor.

Not as I read GitHub's proposal -- I assume it's in the context of a "normal" GitHub account, where there is a separate "maintainer" permissions group (above "write", below "admin"). So:

  • "write" perms can say "do this one PR"
  • "maintainer" perms can (only?) add user to allow list for future PRs

[edited to clarify antecedents. dang prepositions!]

@bhearsum
Copy link
Contributor Author

This proposal would require approval for every PR for the same contributor.

Not as I read it -- I assume it's in the context of a "normal" GitHub account, where there is a separate "maintainer" permissions group (above "write", below "admin"). So:

* "write" perms can say "do this one PR"

* "maintainer" perms can (only?) add user to allow list for future PRs

Are you talking about this proposal, or Github's? If you're talking about Github's, I agree! If you're talking about this one, there's currently no plan in place to support an allow list (besides the existing mechanism of adding the user as a read collaborator).

@bhearsum bhearsum force-pushed the test-on-pr-comments branch 2 times, most recently from adebddd to 6ba090e Compare April 30, 2021 20:03
@bhearsum bhearsum force-pushed the test-on-pr-comments branch from 6ba090e to 4ee5f2a Compare May 20, 2021 18:45
@bhearsum bhearsum force-pushed the test-on-pr-comments branch 2 times, most recently from 416640f to 7463214 Compare June 4, 2021 13:38
@bhearsum bhearsum changed the title RFC: Trigger Tests Based on PR Comments RFC: Process Github issue_comment events to support adhoc task creation Jun 4, 2021
@bhearsum
Copy link
Contributor Author

bhearsum commented Jun 4, 2021

It looks to me like this is pretty much settled. I just pushed a change to update the summary/motivation sections to match the more general implementation we ended up settling on, but I think this is ready for Final Comment. @imbstack, @petemoore - what do you think? (Please mark as Final Comment if you think it's ready, I don't have the ability to do so...)

@bhearsum bhearsum force-pushed the test-on-pr-comments branch from 7463214 to 6d05061 Compare June 7, 2021 13:26
@bhearsum bhearsum force-pushed the test-on-pr-comments branch from 6d05061 to 6a19847 Compare June 10, 2021 18:18
@bhearsum
Copy link
Contributor Author

I heard no objections in Final Comment. I opened https://bugzilla.mozilla.org/show_bug.cgi?id=1715848 for tracking implementation. @petemoore or @imbstack - can one of you merge this, please?

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

Successfully merging this pull request may close these issues.

6 participants