19

We'd like to list all GitHub issues created in the last seven (or, n) days. This is a relative time window.

We don't want to use a specific date, because we'd like to create a link that is always correct (so we can link to the report of recent issues).

Thanks!

Seth Ladd
  • 112,095
  • 66
  • 196
  • 279

2 Answers2

4

According to https://help.github.com/articles/searching-issues/#search-based-on-when-an-issue-or-pull-request-was-created-or-last-updated

created:2016-12-01..2016-12-08

Will output issue created during these 7 days.

sebastienvg
  • 303
  • 1
  • 7
  • 15
    Thanks. But, unfortunately, that's still using real dates. I'm looking for a solution that does not use exact dates. Instead, I'd like to use a relative date (e.g. "7 days ago"). – Seth Ladd Aug 03 '16 at 22:14
2

You could create a bookmarklet, like I have, to for example, show your merged PRs last 7 days within a repo. Here's my bookmarklet:

data:text/html,<script>document.location.href%3D%60https://github.com/calcom/cal.com/pulls%3Fq%3Dis%253Apr%2Bauthor%253Aleog%2Bis%253Aclosed%2Bmerged%253A%253E%24%7Bnew Date((new Date).setDate((new Date).getDate()-7)).toISOString().split("T")%5B0%5D%7D%60%3B</script>
leog
  • 778
  • 10
  • 15
  • Note that if you want this to work from the New Tab page in Chrome, you'll need to construct it slightly differently: https://stackoverflow.com/q/56793918/388951 – danvk Jun 29 '23 at 15:38
  • Thanks @danvk, works great on new tab now too, updated the snippet – leog Jul 21 '23 at 19:13