github / github/gh-gei

Use Uri class for constructing URLs

Open
#1,040 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
478
Forks
146
Avg merge
7d 21h
Merged PRs (30d)
2

Description

We are constructing URLs by concatenating strings:

https://github.com/github/gh-gei/blob/1740f9e74d06e12848eac9037f683fb6346e45e5/src/Octoshift/Services/AdoApi.cs#L30

It'd be better to use the `Uri` class to build URIs and consume them as `Uri` objects:

- https://learn.microsoft.com/en-us/dotnet/api/system.uri?view=net-7.0

By using `Uri` classes, we would get exception handling for free, and we'd be building more robust URLs :+1:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.