I would like to view all of the GitHub issues opened during a specific time range for a single repository. For example, all issues opened during the month of December 2022.
I can query for issues created after a specific date with the following query: is:issue created:>2022-12-01, however attempting to limit the search to exclude issues opened after December 31st is not currently working for me. And I don't immediately see the syntax in the GitHub documentation [1].
[1] https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
You need to use the range operator for these searches (which is ..):
is:issue is:open created:2022-01-01..2022-12-31 .
See the docs here: https://docs.github.com/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates
Related
I have been searching Github documentation well as pygithub documentation as well on how I could get the stats for each users committed and merged lines of code into the master branch from a specific date. So far the best i could find is under contributions it list out a users committed lines of codes however this gives the stats for the life of the project but i need to filter this by a specific date. Is there anyway to do this appreciate the help.
It looks like you can pretty easily retrieve a list of the commits from a specific user and in agiven date range using the pygithub Repository get_commits method. You can see from the method signature below that you can filter by the hash, path, date range, and author.
def get_commits(
self,
sha=github.GithubObject.NotSet,
path=github.GithubObject.NotSet,
since=github.GithubObject.NotSet,
until=github.GithubObject.NotSet,
author=github.GithubObject.NotSet,
)
Is there a way to get the GitHub issues that were closed on-or-near a date? I have a commit in my codebase that does not reference an issue, and I'm wondering if it was done in response to a particular issue.
Ideally, I'd like to say "show me issues that were closed after August 10"
Use closed: to search for issues based on date closed. For example, to find issues closed after Aug 10, 2020, do
closed:>2020-08-10
You can also use a range. For example, to find issues closed in February or March of 2020, do:
closed:2020-02-01..2020-03-31
On the other hand, using state:closed updated:>=YYYY-MM-DD returns all issues that are currently closed and have been updated anytime on or after a particular date, which is not necessarily the same thing.
See the GitHub doc sections on the "closed" qualifier and working with dates.
Have a look at GitHub Searching issues and pull requests
.
An example would be something like:
state:closed updated:>=2013-02-01
with the date format as described in the docs as updated:YYYY-MM-DD
I need to do a very large search on Github for a statistic in my thesis.
For example, I need to explore a large number of Android projects on GitHub, but the site limits the search result to 1000 (ex. https://github.com/search?l=java&q=onCreate&ref=searchresults&type=Code&utf8=%E2%9C%93). Also using the Java GitHub API I tried the library org.eclipse.egit.github.core.client.GitHubClient using the method GitHubClient.searchRepositories() but even there the number of results is limited.
Does anyone know how to get all results?
The Search API will return up to 1000 results per query (including pagination), as documented here:
https://developer.github.com/v3/search/#about-the-search-api
However, there's a neat trick you could use to fetch more than 1000 results when executing a repository search. You could split up your search into segments, by the date when the repositories were created. For example, you could first search for repositories that were created in the first week of October 2013, then second week, then September, and so on.
Because you would be restricting search to a narrow period, you will probably get less than 1000 results, and would therefore be able to get all of them. In case you notice that more than 1000 results are returned for a period, you would have to narrow the period even more, so that you can collect all results.
https://help.github.com/articles/searching-repositories/#search-based-on-when-a-repository-was-created-or-last-updated
You should be able to automate this via the API.
If you are searching for all files in Github with filename:your-file-name, you could also slice it with a query attribute : size.
For example, you are looking for all files named test.rb in Github, Github API may return more than 11M results, but you could only get 1000 of them because the GitHub Search API provides up to 1,000 results for each search. An url like : https://api.github.com/search/code?q=filename:test.rb+size:1000..1500 would be able to slice your search by changing size range.
I am not sure if this is possible - I would like to know which issues were in which state on certain date. I tried but did not find anything. Any help would be appreciated.
EDIT: To make it clear, I would like to see status of the project e.g. a week ago, such as:
PROJECT=A AND issueType=Bug ON 2015/04/04 //something like that
Yes you can !!
Jira has advanced search feature,where you can provide different query and you can also get all bugs for one or more projects at particular data.
For more details go through
To get bugs created,resolved or updated on particular date there are custom fields created at , resolved at and updated at and then you need pass date in yyyy-mm-dd format
[Reference] http://blogs.atlassian.com/2013/01/jql-the-most-flexible-way-to-search-jira-14/
Is the order of repositories for a user simply the order of entry? I cannot see any logic in what is at the top of, for example, thoughtbot.
I'm thinking of writing a tool to get my desired ordering using the API, but maybe if I grokked the order better I could scan the list easier and not feel so compelled.
For example, as of 2013-12-21 16:01, these are the top two items on Thoughtbot:
shoulda-matchers - Last updated a day ago
suspenders - Last updated a day ago
But then the top item does not say it was updated a day ago ;
Dec 18, 2013 - Make order option Rails 4.0.1-compatible - aff7bd7e2a - authored 20 days ago
And the second on the list says it was authored a day ago
Dec 20, 2013 - Add spring - 078237f9ed - authored a day ago
Update;
The pull request is not related to the dates, see below. The comments are not related either. Thus I conclude perhaps there is evidence of a github bug. I will send another note to them. Perhaps this detail will help!
The two Closed Pull requests as of 2013-12-30Mon.09:19:09
TOP item = 11d ago ;
https://github.com/thoughtbot/shoulda-matchers/pulls?direction=desc&page=1&sort=created&state=closed
Make order option Rails 4.0.1-compatible
This is a fix for #388. From the commit: The way that we figure out whether the value which is p…
by mcmire 11 days ago
3 comments
2ND ITEM
https://github.com/thoughtbot/suspenders/pulls?direction=desc&page=1&sort=created&state=closed
Add spring
It's good stuff, and Rails 4.1 will include Spring by default. We may as well get on this train e…
by jferris 10 days ago
1 comment
They're ordered by time of last commit, newest at the top.
If you have a look at the GitHub API it says that the repositories are ordered by their creation date. Github API for listing repositories
It seems that this is also the case if for your personal repositories in the repository view. (Just tested this on my account)
(EDIT: I just realized that for the account that you mentioned, the repos are ordered by their last commit. However this is not the case for my account. It seems that the ordering depends on the overall number of repos linked to the account)