psss / did

What did you do last week, month, year?
https://did.readthedocs.io/
GNU General Public License v2.0
245 stars 103 forks source link

Too recent GitHub pull requests included #362

Open susnux opened 4 months ago

susnux commented 4 months ago

If I run:

% did --since 2024-02-18 --until 2024-02-25 Status report for given date range (2024-02-18 to 2024-02-25).

The report includes this pr: https://github.com/nextcloud/firstrunwizard/pull/1105 Which was created: Feb 26, 2024, 6:15 PM GMT+1

This should not be included in the date range as the 26th is not in the range.

Felixoid commented 3 months ago

@psss I think it's because of these lines https://github.com/psss/did/blob/070a535d9250200ddfb8c43f9ae81f999fe51492/did/cli.py#L143-L144

It looks like for github every self.options.until should have changed - delta(days=1). WDYT?

For example, /usr/bin/did --width=0 --since=2024-03-12 --until=2024-03-12 --format=markdown --debug generates the next snippet:

 INFO  Searching for pull requests created by Mikhail f. Shiryaev <mr.felixoid@gmail.com>
Mikhail f. Shiryaev <felixoid@clickhouse.com>
 DEBUG  GitHub query: https://api.github.com/search/issues?q=author:Felixoid+created:2024-03-12..2024-03-13+type:pr&per_page=100

The given URL contains the next three PRs:

image

But what I need is actually this image

Pay attention to the created:2024-03-12..2024-03-12 on the latter screenshot.

Felixoid commented 3 months ago

A solution is presented in https://github.com/psss/did/pull/363/commits/125f468a5ce9090d6ac55ed049c281b4ecd8f018