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

Add Issue Timeline API #389

Merged
merged 5 commits into from
Jun 1, 2023
Merged

Conversation

0xB10C
Copy link
Contributor

@0xB10C 0xB10C commented Jun 1, 2023

This adds the Timeline Events API for issues along with previously missing Issue Event Types. A ListTimelineEventsBuilder is implemented for Issue (though as "each pull is also an issue" this works for requesting a Pull-Request timeline too).

I've extensively tested this against the issues and pulls in the bitcoin/bitcoin repo. This resulted in nearly every TimelineEvent field besides the actual event needing to be Option<>s as the API sometimes returns null values for fields it normally sets. Also, some of the added event types aren't listed in the API documentation. I hope I got all of them, but there might be some that don't appear in bitcoin/bitcoin.

0xB10C added 3 commits June 1, 2023 12:36

Verified

This commit was signed with the committer’s verified signature.
0xB10C b10c
The timeline API added in the next commits uses the issue event
types. These were incomplete. Also adding documentation to the
event types based on:

https://docs.github.com/en/webhooks-and-events/events/issue-event-types

However, this also includes some event types that aren't documented:
- "line-comment"
- "cross-referenced"
- "comment_deleted"
- "base_ref_force_pushed"

Verified

This commit was signed with the committer’s verified signature.
0xB10C b10c

Verified

This commit was signed with the committer’s verified signature.
0xB10C b10c
@0xB10C 0xB10C force-pushed the 2023-05-timeline branch from 846413d to 23a8fa2 Compare June 1, 2023 12:26
@maflcko
Copy link
Contributor

maflcko commented Jun 1, 2023

May have to run cargo fmt ;)

0xB10C added 2 commits June 1, 2023 15:31

Verified

This commit was signed with the committer’s verified signature.
0xB10C b10c

Verified

This commit was signed with the committer’s verified signature.
0xB10C b10c
This would result in failing deserialization
@0xB10C 0xB10C force-pushed the 2023-05-timeline branch from 23a8fa2 to b801909 Compare June 1, 2023 13:31
@XAMPPRocky
Copy link
Owner

Thank you for your PR!

@XAMPPRocky XAMPPRocky merged commit bda2651 into XAMPPRocky:main Jun 1, 2023
@0xB10C 0xB10C deleted the 2023-05-timeline branch June 1, 2023 14:46
@github-actions github-actions bot mentioned this pull request Jun 1, 2023
#[serde(skip_serializing_if = "Option::is_none")]
pub pull_request_url: Option<Url>,
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_reviewers: Option<Vec<Author>>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should have been pub requested_reviewers: Option<Author>. It's only a single reviewer that's requested per event and not multiple.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed with #390

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.

None yet

3 participants