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

Fixes #1303: Fix remote URLs for Azure DevOps #1304

Merged
merged 1 commit into from Jan 4, 2021

Conversation

travatomic
Copy link
Contributor

@travatomic travatomic commented Jan 3, 2021

Description

Fixes #1303

Remove the encoding to prevent double encoding for Azure DevOps URLs, to avoid these URLs from being 404 URLs.

Backstory:

When we added encodeURI() wrappers in 545dc4a, this caused a double-encoding problem with Azure DevOps URLs.

The problem exists in two places:

  1. The baseUrl. Azure DevOps allows us to create projects and repositories which include spaces. This results in the path (and the subsequent baseUrl) containing %20. After being run through encodeURI(), this was changed to %2520 which resulted in a 404.
    1. I've decoded the path, so that later down the workflow, when we encode the entire URL, we don't end up double-encoding

  1. The file path. Azure DevOps deep links to a path were hard-coded to use %2F instead of the /. After being run through encodeURI(), these were being changed to %252F, again resulting in a 404
    1. I changed this back to /. After passing through encodeURI, this remains untouched as / which works fine with Azure DevOps.

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

@eamodio eamodio merged commit 9b90b30 into gitkraken:main Jan 4, 2021
@eamodio
Copy link
Member

eamodio commented Jan 4, 2021

Awesome work -- thank you so much!

Thank you!

@eamodio eamodio added this to the Soon™ milestone Jan 4, 2021
@eamodio eamodio added the bug Something isn't working label Jan 4, 2021
@eamodio eamodio self-assigned this Jan 4, 2021
@eamodio eamodio added needs-verification Indicates a request for community verification pending-release Indicates that the issue been resolved, but has not yet been released to the stable edition and removed needs-verification Indicates a request for community verification pending-release Indicates that the issue been resolved, but has not yet been released to the stable edition labels Jan 4, 2021
@eamodio eamodio modified the milestones: Soon™, Shipped Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open on Remote is creating invalid URLs for Azure Devops
2 participants