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/
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.
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.
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.
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.
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...}
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With