Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When searching Issues or Pull Requests in Github, can you specify a date relative to "today"?

Is there a way to search Pull Requests (and likewise Issues) on Github where you specify a date range relative to today?

My team meets weekly with another team, and we like to present them a list of Github pull requests we've merged within the past week.

We can do a search for any items merged since a particular date with the filter:

is:pr is:closed merged:>=2016-03-31

But this needs to be updated every week, which is less than ideal. (As you can see, it's already out of date :)

However I see no mention of relative dates in their support article on searching issues: https://help.github.com/articles/searching-issues/

Nor is there mention of relative dates in the search syntax article: https://help.github.com/articles/search-syntax/

like image 661
RUN-CMD Avatar asked Apr 14 '16 17:04

RUN-CMD


People also ask

How do I find a specific pull request on GitHub?

Click Create Pull Request. GitHub Desktop will open your default browser to take you to GitHub. On GitHub, confirm that the branch in the base: drop-down menu is the branch where you want to merge your changes. Confirm that the branch in the compare: drop-down menu is the topic branch where you made your changes.

How do I use Pull requests and issues in GitHub?

The issue and pull request must be in the same repository. On GitHub.com, navigate to the main page of the repository. Under your repository name, click Pull requests. In the list of pull requests, click the pull request that you'd like to link to an issue.

Can pull request be updated?

From the pull request page you can update your pull request's branch using a traditional merge or by rebasing. A traditional merge results in a merge commit that merges the base branch into the head branch of the pull request. Rebasing applies the changes from your branch onto the latest version of the base branch.

How do you suggest changes in a pull request?

In the list of pull requests, click the pull request you'd like to apply a suggested change to. Navigate to the first suggested change you'd like to apply. To apply the change in its own commit, click Commit suggestion. To add the suggestion to a batch of changes, click Add suggestion to batch.


2 Answers

The search API may have been updated since this original question, but you can limit date ranges by duplicating the exclude params.

-created:<=2018-01-01 -created:>=2018-03-31 {other params...}

If you only want anything newer than 2018, then you can leave out the first part, e.g.:

-created:>=2018 {other params...}
like image 59
Justin Tucker Avatar answered Jan 02 '23 23:01

Justin Tucker


I am not aware of a way to do this and as you mention their search documentation does not cover it.

However, the GitHub API does provide a created_at and an updated_at property for issues it returns, so depending on how useful it would be you might consider setting up a simple script to get all the issues related to specific repos and then filtering the response(s) you get back based on those properties.

like image 39
Grae Avatar answered Jan 02 '23 21:01

Grae