Skip to content

Missing parts of the API for repository issues #470

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

Merged
merged 3 commits into from
Apr 2, 2022
Merged

Missing parts of the API for repository issues #470

merged 3 commits into from
Apr 2, 2022

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Dec 11, 2021

Motivation: see issue #286 and agda/agda#5691
Closes: #286 and #287
Needs: release (e.g. 0.28)

As observed in #286 and #287, the API for listing repository issues, see https://docs.github.com/en/rest/reference/issues#list-repository-issues, is incompletely reflected in github-0.27. Esp. the functionality to get just the issues for a particular milestone is not exported.

This PR adds the missing parts of the API as new methods to construct IssueRepoMod.
With the functionality added by this PR, the API is now complete. In particular, I conjecture the following completeness statement:

Using the language exported by GitHub.Data.Options,
for all o : IssueRepoOptions, there is some m : IssueRepoMod, such that o = toIssueRepoOptions m.

In contrast, the API of 0.27 is incomplete:

There is are no m : IssueRepoMod and i : Id Milestone such that toIssueRepoOptions m = defaultIssueRepoOptions{ issueRepoOptionsMilestone = FilterBy i }.

Successful CI run at: https://github.com/andreasabel/github/actions/runs/1556147789

- remove unused imports
- disable star-is-type warning while we are supporting GHC 7
Add missing methods to set the following fields of 'IssueRepoOptions':
- specific milestone
- specific assignee
- creator
- mentioned
@andreasabel andreasabel changed the title Missing parts of the API for _repoIssues_ Missing parts of the API for repository issues Dec 11, 2021
@andreasabel
Copy link
Member Author

Ping @phadej. The workflow needs to be started manually.

@andreasabel
Copy link
Member Author

Thanks for the review, @phadej! I updated the PR accordingly.

@andreasabel
Copy link
Member Author

@phadej, what's the plan? Can you release this fix?

@phadej
Copy link
Contributor

phadej commented Jan 11, 2022

@andreasabel do you want to be come the maintainer of github. I'll be happy to transfer this repository to you.

(I have been looking for someone to look after this library for quite some time)

@andreasabel
Copy link
Member Author

@andreasabel do you want to be come the maintainer of github. I'll be happy to transfer this repository to you.

(I have been looking for someone to look after this library for quite some time)

@phadej Yes, I am happy to maintain github. I have some interest in this library.

@andreasabel
Copy link
Member Author

@phadej ping.

@phadej
Copy link
Contributor

phadej commented Feb 1, 2022

I cannot transfer this repository as andreasabel/github already exists

@andreasabel
Copy link
Member Author

I cannot transfer this repository as andreasabel/github already exists

Ah, sorry about that. I renamed the fork, hope it works now.

@phadej
Copy link
Contributor

phadej commented Feb 1, 2022

Looks like that's not enough, it still errors with

andreasabel already has a repository in the phadej/github network

@andreasabel
Copy link
Member Author

@phadej: Sorry, I got distracted. I now created a new organization to host this project: https://github.com/haskell-github
This organization will allow collaboration independent of my personal account.
Please transfer it there.

@andreasabel andreasabel merged commit 3a26d2f into haskell-github:master Apr 2, 2022
@andreasabel andreasabel added this to the 0.28 milestone Apr 29, 2022
This was linked to issues May 28, 2022
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.

This could be an example for your API How to use FilterBy ? How to use IssueRepoMod ?
2 participants