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

Fix package name escaping in UserService #3341

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DiegoDev2
Copy link
Contributor

Description

This pull request addresses the issue described in #3262 by adding support for the PackageName escaping in the go-github library.

Changes Made

Updated the UserService.GetPackage method to escape package names consistently using url.PathEscape, aligning it with the OrganizationsService.GetPackage.

This change ensures consistent handling of package names across the API, improving overall reliability and usability.

Copy link

google-cla bot commented Nov 2, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link

codecov bot commented Nov 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.30%. Comparing base (2b8c7fa) to head (203c1c4).
Report is 163 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3341      +/-   ##
==========================================
- Coverage   97.72%   92.30%   -5.42%     
==========================================
  Files         153      176      +23     
  Lines       13390    15031    +1641     
==========================================
+ Hits        13085    13874     +789     
- Misses        215     1064     +849     
- Partials       90       93       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. waiting for signed CLA labels Nov 2, 2024
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @DiegoDev2.
Please update the unit tests to demonstrate the new behavior.

@DiegoDev2
Copy link
Contributor Author

okay

@DiegoDev2
Copy link
Contributor Author

Hi @gmlewis ! Today I advanced the tests, maybe I won't be able to finish them today since I have some errors. I'll fix them tomorrow, is that okay with you?

@gmlewis
Copy link
Collaborator

gmlewis commented Nov 3, 2024

I'll fix them tomorrow, is that okay with you?

Of course. No rush, no pressure. We appreciate your contributions whenever you are able.

@DiegoDev2
Copy link
Contributor Author

DiegoDev2 commented Nov 3, 2024

I just realized that in the users test url here has the same URL as here

In addition to that, the two urls are from orgs, in users it should be https://api.github.com/users/github/packages/container/hello%2Fhello_docker and not like that https://api.github.com/orgs/github/packages/container/hello%2Fhello_docker If I am wrong please correct me.

@gmlewis
Copy link
Collaborator

gmlewis commented Nov 4, 2024

If I am wrong please correct me.

If I'm not mistaken, these are simply values (test data) and therefore it doesn't matter what they are. If you find them confusing or unexpected, feel free to update them.

I'm looking at this from my cell phone, so I might not be understanding correctly what you are attempting to point out. If this is the case, I will take a more careful look tomorrow from my desktop machine.

@DiegoDev2
Copy link
Contributor Author

If I am wrong please correct me.

If I'm not mistaken, these are simply values (test data) and therefore it doesn't matter what they are. If you find them confusing or unexpected, feel free to update them.

I'm looking at this from my cell phone, so I might not be understanding correctly what you are attempting to point out. If this is the case, I will take a more careful look tomorrow from my desktop machine.

okay it seems perfect to me.

@DiegoDev2
Copy link
Contributor Author

Hi, sorry I'm late, but I've been busy with school and personal projects and I'm almost done with the tests. @gmlewis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsReview PR is awaiting a review before merging. waiting for signed CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants