GitHub API v3 - get last N commits by user on project [duplicate] - api

This question already has an answer here:
GitHub api to obtain last N number of commits
(1 answer)
Closed 2 years ago.
I'm looking for a way to get the latest N (say 10) commits (the commit messages and time of commit would be enough) a user made on a specific project (repo)? Is there any way to do this with the GitHub API?

The GitHub commits API does not currently support filtering by a specific author or committer login/e-mail address.

Related

GitHub REST API: Efficiently Fetch Comment Lists from Mutliple Issues

I want to use the GitHub REST API to fetch "a list of comments made in repository X since date Y".
GitHub does not appear to have a specific API method designed to do what I want efficiently.
The repos/comments method appears to return git commit comments, not GitHub issue comments.
The issues/comments method will let me fetch comments made on a single issue.
The best I've been able to come up with is querying for issues (which will include PRs) for a date range, and then making a single API call per issue. This means if there's been activity in 20 issues, I'm making 21 API calls (one for the list of issues and then twenty for each issue to get the comments).
This feels inefficient. Is there a way to get the information I want (all issue comments made on a repository within a date range) using fewer API calls?

How to search Deals with its properties ‘closedate’ that falls between a date range

I’m getting deals from GET /deals/v1/deal/paged and wanted to know how do I get only the list of deals with closed date falls between a date range (e.g. between 01.Jan.2018 to 31.Jan.2018).
On top of that, does the API support fields sorting?
Thanks.
Derek (from Hubspot) answered to this question in their community forum.
Summary:
Hubspot deal API does not support filter and sorting.
Use contact list to group contacts based on criteria.
Then pull associated deals from the list via API.
Here's the link to the forum post - https://integrate.hubspot.com/t/how-to-search-deals-with-its-properties-closedate-that-falls-between-a-date-range/7789

Get commit history of all the contributors of a repository

Is there a way to get the commit history of all the contributors of a git repo with lines added,deleted.
Currently the statistics api provides the stats of top 100 contributors, but not everyone.
https://developer.github.com/v3/repos/statistics/
(https://api.github.com/repos/saltstack/salt/stats/contributors
You won't get more than 100 through the GitHub API alone: see "How can I get more than 100 results from GitHub API v3 using “github_api” gem?".
The results are capped at 100.
You would need top clone the repo, and then show the number of changed lines per author in git.
or use a tool like gitinspector:

To prevent multiple login with same user Id [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I had implement session to store the user id, but after that i realized that only work for single browser not for different browser. I think the session is store in the browser. Do you guys got any idea implement this?
The way I do this is that I log the date/time the user logs in and out of the program/website, for example:
---------------------------------------------------
| username | lastLoggedIn | lastLoggedOut
---------------------------------------------------
| Joe | 06/05/2015, 17:12 | 06/06/2015, 17:16
---------------------------------------------------
| Bob | 04/05/2015, 19:16 | 04/05/2015, 20:21
My code then compares the lastLoggedIn entry with the lastLoggedOut entry; if the lastLoggedOut entry is earlier than the lastLoggedIn entry, then the user is still logged in and we can prevent them logging in again.
To verify this, we need to compare the two entries, firstly splitting them into separate Date and Time variables and then working on the values given.
As the author of the question has pointed out:
what if the user simply closes their browser without logging out
first?
This situation is slightly trickier to handle, but nonetheless doable. I'm unsure for VB.NET, but for C# you are able to catch a browser closing event by using onbeforeunload.
If you're using HTTP Keep Alive (it can be enabled in IIS, see here), simply scan the concurrent server connections for the IP; if it is not found then update the user's lastLoggedOut field.
what if the web server crashes when users are logged in?
Though hopefully you've programmed your web application so that won't happen, a crash or power outage could happen at any time. This does mean that users will still be listed as logged in in the database.
To fix this, simply add a check when the web-app starts up to check for users still listed as logged in; you can then 'log them out' by replacing the entry with a valid one.
For completion, you might also want to dump the members who were 'repaired' by the system into a file so that if any of them have further issues you have an audit trail.

Disqus API request to find unanswered comments from users

I'm trying to build Disqus API request to find unanswered comments from users (with time frame, for example - last 5 days).
So, response should be a posts/list with time frame (since). Question is how can I put to this request two other conditions:
- post author is not a moderator
- post doesn't have answer (reply)
I would be very grateful for help