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

Implement getting users and reopos by their respective IDs #690

Merged
merged 15 commits into from
Sep 30, 2024

Conversation

InAnYan
Copy link
Contributor

@InAnYan InAnYan commented Sep 7, 2024

Closes #683.

Well, what I basically did is that I introduced UserRef and RepoRef.

They are enums with two variants: either full form (nickname, owner/name pair), or ids.

I implemented std::fmt::Display for them, so that it's easier to operate in API URLs.

No breaking changes!!

@InAnYan
Copy link
Contributor Author

InAnYan commented Sep 7, 2024

This is my first PR in Rust, so, uh. It may be not ideal. But I'm ready to improve it

@InAnYan
Copy link
Contributor Author

InAnYan commented Sep 8, 2024

CRUCIAL UPDATE: in order to get repository by id, you need to use repositories in the URL, not repos.

I'll update this later

@InAnYan
Copy link
Contributor Author

InAnYan commented Sep 17, 2024

Another update:

To get user by name, /users/{login} should be used.

To get user by id, /user/{id} should be used.

@XAMPPRocky
Copy link
Owner

Seems like there's some breakage in tests 🙂

@InAnYan
Copy link
Contributor Author

InAnYan commented Sep 30, 2024

I see now why the tests fail.

The thing I got very confused with is: why it worked in my project...

It worked because I used IDs, but not other things... Now I need to fix this

@InAnYan
Copy link
Contributor Author

InAnYan commented Sep 30, 2024

@XAMPPRocky tests are fixed

@XAMPPRocky
Copy link
Owner

Thank you for your PR, and congrats on your first contribution! 🎉

@XAMPPRocky XAMPPRocky merged commit 6ca4140 into XAMPPRocky:main Sep 30, 2024
11 checks passed
@github-actions github-actions bot mentioned this pull request Sep 30, 2024
benpueschel added a commit to benpueschel/octocrab that referenced this pull request Oct 6, 2024
Fix a build issue introduced by XAMPPRocky#690 when building octocrab with the
`stream` feature.

Closes: XAMPPRocky#707
XAMPPRocky added a commit that referenced this pull request Oct 15, 2024
* fix: crate build issues with `stream` feature

Fix a build issue introduced by #690 when building octocrab with the
`stream` feature.

Closes: #707

* style: cargo fmt

* ci: add checks for `stream` feature

* docs: fix release-asset stream test

* Add LLVM for symboliser.

* Add ubuntu check

* Remove --verbose

* ci: feature matrix

* ci: add missing dollar sign

---------

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to get repository ID and use repositories by ID
2 participants