psss / did

What did you do last week, month, year?
https://did.readthedocs.io/
GNU General Public License v2.0
246 stars 104 forks source link

Allow to report created github releases #310

Open szaimen opened 1 year ago

szaimen commented 1 year ago

Hello,

this is a great tool, thank you for creating it! :)

it would be great if it would be possible to track and report github releases that have been created by my account.

Thank you for consideration! :)

psss commented 11 months ago

Thanks for the feedback, glad that did is helpful! Implementing releases should not be difficult although it seems that the API does not provide much filtering options:

However, all important information (such as uploader or published_at timestamp) seems to be there, for example here's the output for all tmt releases:

Feel free to file a pull request with the new release stats! :)

psss commented 11 months ago

Other github plugin stats can serve as an inspiration:

https://github.com/psss/did/blob/101d208b92d45482936078cca8d722a1924fb9b6/did/plugins/github.py#L133-L142

szaimen commented 11 months ago

I see, thanks for the pointers!

Am I right that I would need to recursively query all repositories that the user has access to in order to retreive if they created a new release? How can I do this? Or is there another, better way?

psss commented 11 months ago

Unfortunately it looks like that. Unless there is another API call which would allow searching across projects. I haven't found one in the list. One way could be to provide a list of active projects in the config. It could look like this:

[github]
type = github
login = psss
url = https://api.github.com/
projects = psss/did, teemtee/fmf, teemtee/tmt

Then we would check only these relevant ones.

szaimen commented 11 months ago

One way could be to provide a list of active projects in the config. It could look like this:

[github]
type = github
login = psss
url = https://api.github.com/
projects = psss/did, teemtee/fmf, teemtee/tmt

Then we would check only these relevant ones.

Makes sense 👍

Since I only want to add releaeses logging and not modify existing logic, maybe projects should be named releaseProjects or something so that it is clear that this is only meant for the releases stats or WDYT?

psss commented 11 months ago

I'd vote for something short, and projects could be possibly useful for other stats as well in the future.

szaimen commented 11 months ago

I'd vote for something short, and projects could be possibly useful for other stats as well in the future.

All right