[Downloader] Parse tree URLs when cloning repos #2119

Merged
Tobotimus merged 2 commits from V3/allow_tree_urls into V3/develop 2018-09-12 02:03:15 +02:00
Tobotimus commented 2018-09-10 13:09:08 +02:00 (Migrated from github.com)

This addition handles a seemingly common misuse of [p]repo add, where users include the trailing /tree/branch part of a repo URL. The intended behaviour of how these are parsed should be explained by the supplied test case.

This addition handles a seemingly common misuse of `[p]repo add`, where users include the trailing `/tree/branch` part of a repo URL. The intended behaviour of how these are parsed should be explained by the supplied test case.
tekulvw (Migrated from github.com) reviewed 2018-09-10 13:09:08 +02:00
Twentysix26 (Migrated from github.com) reviewed 2018-09-10 13:09:08 +02:00
mikeshardmind commented 2018-09-11 21:04:40 +02:00 (Migrated from github.com)

I'll test this in more depth later, it does appear to work, but I think since this is so easily detected and parsed, a more satisfactory solution would cover this behavior for each major online VCS, not just githubs url syntax.

Edit note, my phrasing left that unclear, it's been updated to clarify.

I'll test this in more depth later, it does appear to work, but I think since this is so easily detected and parsed, a more satisfactory solution would cover this behavior for each major online VCS, not just githubs url syntax. Edit note, my phrasing left that unclear, it's been updated to clarify.
mikeshardmind (Migrated from github.com) requested changes 2018-09-11 21:24:00 +02:00
mikeshardmind (Migrated from github.com) left a comment

Works properly for GitHub, and GitLab. Does not work for bitbucket. Have not looked at others. While I'm not sure it matters enough to special case each other online VCS, I'd at least like a sanity check that we're not trying to do anything fancy with a URL scheme which isn't expected, so I'd like this to not match if not using a supported site, and require the old format in that case (a clone URL + branch name)

Works properly for GitHub, and GitLab. Does not work for bitbucket. Have not looked at others. While I'm not sure it matters enough to special case each other online VCS, I'd at least like a sanity check that we're not trying to do anything fancy with a URL scheme which isn't expected, so I'd like this to not match if not using a supported site, and require the old format in that case (a clone URL + branch name)
Tobotimus commented 2018-09-12 01:32:39 +02:00 (Migrated from github.com)

@mikeshardmind See updated, thanks

@mikeshardmind See updated, thanks
mikeshardmind (Migrated from github.com) approved these changes 2018-09-12 01:38:13 +02:00
mikeshardmind (Migrated from github.com) left a comment

Appreciate the quick changes. Have tested, and this now behaves as expected in the github/gitlab case, without modifying other cases without the same defined behavior.

Appreciate the quick changes. Have tested, and this now behaves as expected in the github/gitlab case, without modifying other cases without the same defined behavior.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!2119
No description provided.