gitlabr icon indicating copy to clipboard operation
gitlabr copied to clipboard

Project Members

Open datawookie opened this issue 3 years ago • 3 comments

Hi @statnmap,

I was hoping to use {gitlabr} to retrieve data about the members on each of my projects. I had a quick scan through the repository and there doesn't seem to currently be a function for this.

Looks to me like this would require wrapping the following endpoints:

GET /groups/:id/members
GET /projects/:id/members

I'd be happy to implement and create a PR. However, if you are already working on this then I'd prefer to duplicate work.

Best regards, Andrew.

datawookie avatar Dec 02 '21 12:12 datawookie

Hi Andrew, Thank you for your proposition to contribute.
However, the possibilities of the API are huge, and I don't plan to include them all. I think I want to focus on those complex to use.

For propositions like yours, I plan to write a vignette explaining in more details how to use {gitlabr} for different custom calls that are possible using gitlab() function.

I think this is the case of your proposition. If I am not mistaken, you can directly use:

gitlab(c("projects", your-id, "members"))

I would be more interested if you could participate in this vignette writing: https://github.com/statnmap/gitlabr/issues/42

Does this seems fair to you? Thank you for your understanding.

statnmap avatar Dec 06 '21 10:12 statnmap

Hi Sébastien,

I completely understand and I'd be happy to get involved with writing that vignette.

And I like the fact that there is a general purpose interface for accessing the API. However, I also think that for ease of use (for the "average user", who might not understand the details of the API), it might be simpler to support these calls with individual functions. I know that this might mean a fairly large number of functions. However, with careful design we should be able to write functions which can cater for calls to a number of different but related endpoints. WDYT?

Thanks, Andrew.

datawookie avatar Dec 06 '21 11:12 datawookie

Hi Andew, If you are motivated to participate, I will not stop you! Contributions are so important for the community.
Note that for each new function though, I use to:

  • Create a reproducible example for the @example part, but in a dontrun{} (for CRAN) but it should work locallly
  • Create a unit test to verify this worked properly on the different projects created for tests. You can see CONTRIBUTING.md. You can also test it locally on a project of yours, and I will adapt to the specific setup of this package. You'll see early enough the results of your proposition with the GitHub Actions though.
  • Add an entry in one of the vignette
  • Add an entry in the NEWS.md

See what you can do. Every contribution is welcome, even if not all these steps are complete.

Thank you.

statnmap avatar Dec 07 '21 07:12 statnmap

functions included in the development version now.

statnmap avatar May 15 '24 09:05 statnmap