Use Gitlab API to fetch ticket titles and urls #18
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.
The Gitlab API provides a more intuitive way to fetch ticket information
and urls. This change allows developers to reference tickets from projects with
simply projectname#ticketnumber.
This has several advantages:
It's been a pain to have to type of e.g. 'tpo/anti-censorship/pluggable-transports/snowflake#40001' to reference new snowflake tickets. This allows developers to just type out 'snowflake#40001'. If there is (for some reason) a name collision, it will raise an IndexError, forcing the developer to specify a more specific path
The Gitlab API is a more sustainable way of determining ticket titles, status, and urls. If, for some reason, Gitlab changes their WebUI we don't have to update the ticketbot.
This fixes another current issue where a user will specify an invalied path+ticket number and ticketbot just returns the Gitlab sign in page.
Note: typing
tor#ticketnumbernow triggers only the new gitlab provider, and not the legacy provider. IMO this is okay, because most people don't use that layout to refer to non core/tor tickets. If this is a problem, we can revert thedefault_refor the legacy provider and the bot will list both links.