Open
Conversation
Use a password. These days, that needn't be the user's GH password, though; they can create as many tokens with limited privileges as they want.
When getting a Net::GitHub::V3 object for a given owner/repo, call set_default_user_repo() on it before returning it.
Net::GitHub::V3 doesn't use them.
Amusing problem I encountered - bot was running this module, plus the normal Title module (which announces the title of links). It would see a SHA, fetch the details, and announce the details - including the link to the commit. The Title module would see that link, and announce the title of the link - which includes the SHA. This module would see the SHA, and announce the details... turtles all the way down! (TODO: submit a patch so Title ignores stuff the bot itself says.)
Wow, that was easy :)
Use the V3 API to get pull request details, rather than just URI::Title. Finally, we can handle PRs for private repos!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOT QUITE READY
Overhauling to use the V3 API, since V2 is gone.
We can use personal API tokens (see #6) so don't need hateful OAuth pain!
Need to finish and merge this, then finish and merge the work to use hooks to announce rather than polling.