Comments (3)
I have looked into this a bit, and unfortunately it's more complicated than I expected so had to give up for now. However, what I've found out about events in GitHub API:
https://github.com/AloisMahdal/events
seems to be the right endpoint.- The endpoint does not support date range querying, so returned data would have to be filtered in the plugin. (Dates returned by GitHub API are ISO 8601 in UTC zero, eg.
2016-05-24T12:32:59Z
.) - The list is limited to last 90 days/300 events, so they are not suitable for longer, eg. yearly reports.
- There are currently 25 types of events; however, I believe 2-5 should suffice (Issue comment, Commit comment, PR Review comment, maybe fork and/or create...)
from did.
There is a way to find a user's events even beyond these limits. However, we must know (1) what kind of events we are looking for, and (2) where exactly to look for them.
For instance, this request will fetch all comments on issues (including pull requests) in the psss/did
repository:
Pagination is fully supported (unlike with events), so one can e.g. find issue comments no. 101 by 200 (sorted by creation time):
Similarly, commit comments can be fetched by:
This should be pull request review comments (although it is empty for this particular repository):
I have not found a way to limit the search to a specific user. That entails transferring possibly much larger data volumes, especially in the case of big repositories with many active contributors. Whether this might lead to significant performance regressions, I dare not say.
In order to make the above work, did
must know which repositories to look into. This could be defined in the config file, e.g.
[github]
type = github
url = https://api.github.com/
token = <token>
repos = psss/did, sosreport/sos, scikit-learn/scikit-learn
Such a solution would happen to resolve issue #86 too.
Any thoughts on this?
from did.
Nice work!
Adding the repos =
seems to me as way to go, even I kinda missed the filtering.
Regarding the performance, this is hard to say. Certainly some repos could have loads and loads of comments so the hit could be significant.
On the other hand issue/review comments are relevant (no less than eg. Bugzilla comments), and since to make this work user would have to set the repos=
key, at least it won't take them by surprise and they have way to control it. Plus, there could be also another key to limit event types so that people could further optimize settings to their needs.
Seems worth trying.
from did.
Related Issues (20)
- Enhancement: configurable first day of the week HOT 1
- git plugin doesn't pull before fetching logs HOT 1
- plugins: gerrit: Deprecation Warning: FancyURLopener
- `did last friday` - only friday supported? HOT 1
- Filter git reporting by type? HOT 5
- GitLab tasks cause an exception HOT 4
- [RFE] plugin for `patchwork` HOT 2
- Allow to report created github releases HOT 7
- Fedora 39 failure due to Python 3.12 changes HOT 1
- Gitea Support HOT 1
- Github "issues commented" includes comments by other users HOT 4
- Directory with many Git repositories isn't recognized HOT 1
- Show whether a Jira ticket got covered by a test HOT 1
- confluence plugin wrongly hint to try `kinit` when `auth_url` lead to a non existent page
- Need a New Release HOT 1
- Invalid plugin type 'jira' in section 'issues'. HOT 3
- Git plugin fails on merges in `--verbose` mode HOT 1
- Add `did` to brew repo HOT 2
- Merge is not working for github HOT 1
- Too recent GitHub pull requests included HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from did.