- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Add associated pull requests and commit compare functionality #413
Add associated pull requests and commit compare functionality #413
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These types were created automatically using the json schema here
The types were generated using https://quicktype.io/
pub patch: Option<String>, | ||
pub previous_filename: Option<String>, | ||
// unlike the schema online, this can be null | ||
pub raw_url: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discovered this while using the endpoints
} | ||
|
||
/// Sends the actual request. | ||
pub async fn send(self) -> crate::Result<models::commits::CommitComparison> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this endpoint accepts pagination params but doesn't return an array so I didn't wrap the return type in Page
@@ -29,7 +29,7 @@ async fn main() -> octocrab::Result<()> { | |||
println!( | |||
"{id} | {url} | [{files}] | {description}", | |||
id = gist.id, | |||
url = gist.html_url.to_string(), | |||
url = gist.html_url, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clippy --fix
examples/create_a_gist.rs
Outdated
@@ -19,6 +19,6 @@ async fn main() -> octocrab::Result<()> { | |||
.public(false) | |||
.send() | |||
.await?; | |||
println!("Done, created: {url}", url = gist.html_url.to_string()); | |||
println!("Done, created: {url}", url = gist.html_url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clippy --fix
tests/current_user_orgs_test.rs
Outdated
@@ -18,13 +18,13 @@ async fn setup_api(template: ResponseTemplate) -> MockServer { | |||
let mock_server = MockServer::start().await; | |||
|
|||
Mock::given(method("GET")) | |||
.and(path(format!("/user/memberships/orgs"))) | |||
.and(path("/user/memberships/orgs".to_string())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clippy --fix
tests/current_user_orgs_test.rs
Outdated
.respond_with(template) | ||
.mount(&mock_server) | ||
.await; | ||
setup_error_handler( | ||
&mock_server, | ||
&format!("GET on /user/membership/orgs was not received"), | ||
&"GET on /user/membership/orgs was not received".to_string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clippy --fix
@@ -20,6 +16,7 @@ pub struct WorkflowRunEventPayload { | |||
#[non_exhaustive] | |||
pub enum WorkflowRunEventAction { | |||
Requested, | |||
InProgress, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flyby fix
Thank you for your PR! Since I merged your other PR, you'll need to rebase these changes to remove the similar changes. In the future I would recommend making the things like clippy --fix a separate PR, as then I could merge all three PRs at once. |
I think the "Squash and merge" strategy will take care of dropping the duplicate changes. |
To be clear, it's also about review, it's harder for me to review a PR if the same changes exist. |
Ok, now it needs a merge or rebase either way :) |
2477b6b
to
dea2ea2
Compare
Thanks for the review and apologies for the delay @XAMPPRocky and @MarcoFalke. Rebased. |
@matthewgapp You need to update your tests to |
Apologies. I should have ran cargo test. I didn't see any signs that |
Thank you for your PR! |
Adds API support for