Skip to content

Get repository from project won't work if project name has space in it #79

@hankxdev

Description

@hankxdev

Get repository from project won't work if project name has space in it

  • Version: 6.0.0

Steps to reproduce

  • Create a project with space in its name, like Project A With Space
  • Call GitRepository getRepository to get repository from the project

Expected behavior

API call should return the repository metadata

Actual behavior

The API call failed with an invalid character error because the final request URL is like this:
https://dev.azure.com/ORGNAME/Project A With Space/***

The space in the URL should be encoded. Can be fixed by simply wrap the stringBuilder.toString() at this line with URLHelper.encodeSpace.

However, the RestClientProvider has been marked as Deprecated since version 6. But it's still been used in a lot of places. so I suppose you have a bigger change for this.

Information Checklist

Kindly make sure that you have added all the following information above and checkoff the required fields otherwise the
issue template will be treated as an incomplete report.

  • Bug Description Added
  • Reproduce Steps Added
  • Expected Behaviour Added
  • Actual Behaviour Added

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions