Commit Graph

58 Commits

Author SHA1 Message Date
Alaska
121e9464f5 Fix: Weekly report error when a user has a commit to a parent repo
With the recent Gitea update, parent repos (E.g. `blender/blender`) do
not have "parents" listed in the information gathered by API anymore.

This has lead to the weekly report script encountering errors if the
user has committed directly to a parent repo. This commit fixes that.

Pull Request: https://projects.blender.org/blender/blender/pulls/142701
2025-07-24 21:59:09 +02:00
Campbell Barton
96111e9cc9 Tools: fix error running weekly_report.py without a date set
Oversight in !141281.
2025-07-05 08:41:40 +10:00
Sybren A. Stüvel
90c05aa2d0 Tools: add option to weekly log generator to only show a single day
Add a new CLI option `--date YYYY-MM-DD` to the weekly log generator. Using
it will make it ignore the `--weeks-ago` parameter, and just show the
activity for that specific day.

This is just something I personally found useful, to occasionally inspect
a specific date (WBSO daily log).

Pull Request: https://projects.blender.org/blender/blender/pulls/141281
2025-07-03 10:38:13 +02:00
Julian Eisel
7417a07adb Fix: Weekly report script error when no PR found for branch
Not all branches have a PR and code generally handled that case fine,
just this assert didn't treat it as a valid result.
2025-05-27 15:59:37 +02:00
Campbell Barton
72f24fcbab Cleanup: resolve pylint warnings 2025-05-23 14:03:20 +10:00
Julian Eisel
ca4b485413 Tools: Adress mypy errors in recent weekly report script additions
5a5e1b7d14 added caused some errors when running `make check_mypy`, see
https://projects.blender.org/blender/blender/pulls/138615#issuecomment-1581404.
2025-05-22 12:37:29 +02:00
Campbell Barton
e5deeafe92 Cleanup: spelling in comments (make check_spelling_*) 2025-05-22 11:11:48 +10:00
Julian Eisel
5a5e1b7d14 Tools: Group commits in weekly report scripts
Since ec141ba3ff, commits from all branches are listed. Issue is that
commits from different repositories and branches will be mixed.
Personally I prefer grouping commits better, so I always edit the output
manually.

With this, commits will be grouped by branch, or PR if one can be found.
The branches and commits will then be printed under their target
repository. This isn't the owning repository of the branch or PR (often
people's personal fork), but the one it targets. This worked much better
in own tests.

Further:
- For some common repositories more readable names are used, e.g.
  "Blender Manual" instead of "blender/blender-manual".
- Commits of the Blender repository are listed first, without grouping
  under a `blender/blender`.
- Commits to each repository's main branch are listed first, directly
  under the repository grouping.
- See PR for a textual mockup of the output format.

Pull Request: https://projects.blender.org/blender/blender/pulls/138615
2025-05-20 19:13:43 +02:00
Julian Eisel
ec141ba3ff Tools: Include commits to all branches in weekly report script
Currently the script only includes commits to "main" branches. Much of
people's work is done in branches however, so developers either
customized the script, or they would manually go through own history to
find remaining commits (I asked some).

Even if some people prefer to only list main branch commits, it's much
easier to simply remove some commits than to add missing ones.

To be able to tell which branch a commit was on, this adds a " on
`branch-name`" after the commit hash. Personally I don't find this
optimal, I'd rather group commits under their repository/branch,
proposed separately in #138615.

Pull Request: https://projects.blender.org/blender/blender/pulls/138612
2025-05-20 19:07:18 +02:00
Julian Eisel
9128348e48 Fix: Tools: Commit hashes not shortened in weekly report script
Broken since 53d076612a.
2025-05-08 17:28:29 +02:00
Thomas Dinges
453d20aeeb Cleanup: Whitespace in issues script 2025-04-23 11:18:14 +02:00
Campbell Barton
9567ac1272 Cleanup: quiet python linter warnings 2025-04-16 11:08:40 +10:00
Thomas Dinges
80db24671b Tools: Update platforms module ID in issues script 2025-04-01 10:36:50 +02:00
Germano Cavalcante
8162e3dc8c Fix: Tools: 'issues_needing_info.py' failing
`&` is used to separate multiple parameters when there is already a `?`
2025-03-03 13:01:26 -03:00
Julian Eisel
426d7c3d54 Fix: Tools: Weekly report script failure
When filtering events by labels and not passing an `event_type`, events
that don't pass the label check would be returned. See #134331.

Mistake in 5de40adc9e.

Also clarify behavior in function comment.
2025-02-10 12:00:46 +01:00
Julian Eisel
5de40adc9e Tools: Improve gitea utils function optional paramenter handling
Two fixes/improvements to `gitea_json_issue_events_filter()`:
- The `username` parameter would be optional, but not setting it would
  make the function do nothing. Ignore it if not set.
- Not passing `event_type` (and not passing `labels`) would make the
  function do nothing. It wasn't optional strictly speaking but the
  default was an empty set, which is more or less the same. Make it
  properly optional so not specifying an event-type will return events
  of any type.
2025-02-07 14:32:50 +01:00
Campbell Barton
5fe261c89d Cleanup: declare __all__ for many scripts in tools/ 2025-01-04 20:27:58 +11:00
Thomas Dinges
c3a7acd034 Tools: Print query URL for modules with 0 reports too. 2024-12-31 13:15:30 +01:00
Thomas Dinges
8c8248de58 Tools / Issues script: Print modules with 0 bugs at the end 2024-12-05 18:52:19 +01:00
Thomas Dinges
b93aa51a6e Tools: Update names after module split
* Add Triaging and Development management modules as well
* Only print modules that have open bugs
2024-11-28 10:59:08 +01:00
Campbell Barton
a0453ab87a Cleanup: update use of typing in for Python scripts 2024-10-23 12:48:09 +11:00
Campbell Barton
dbf6960bf3 Fix error in triage module listing script
The uncategorized reports were not being created due to incorrect
indentation.
2024-10-10 12:10:18 +11:00
Campbell Barton
a74ad65e8e Tools: only prompts for user input when running in a TTY 2024-09-23 10:31:58 +10:00
Campbell Barton
0e51bad197 Tools: correct module name for module listing script 2024-09-23 10:31:58 +10:00
Alaska
8b71df88ba Tools: Check high priority module bugs against their IDs
This resolve issues where high priority bugs wouldn't be sorted if the
name of a module label changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/127361
2024-09-10 16:46:51 +02:00
Thomas Dinges
ba17f6fb14 Tools: Update issues script after module rename. 2024-09-05 09:54:19 +02:00
Campbell Barton
fc1cf66646 Tools: set issues_needing_info.py as executable 2024-08-29 14:47:57 +10:00
Thomas Dinges
d56196ad96 Tools: Update issues script after label rename from priority to severity 2024-08-14 14:42:04 +02:00
Thomas Dinges
c7a5e08162 Tools: Print second list with title and creation date for issues
Also sort by number / creation date.
2024-06-20 12:49:31 +02:00
Campbell Barton
53d076612a Tools: add a hash-length argument for the weekly reports generator
Allows generating reports without abbreviated hashes.
2024-05-30 23:34:24 +10:00
Campbell Barton
343b18d8ce Tools: make weekly report executable 2024-05-06 11:06:13 +10:00
Campbell Barton
f01eb79ab9 Tools: support piping the output of the weekly report generator
- Suppress progress and waiting for input() when the output
  isn't a TTY.
- Use a print_progress utility function that adds trailing space
  instead of including is as part of the string.
2024-04-30 13:23:46 +10:00
Jacques Lucke
3e814bc702 Tools: gitea utils does not load all pages
The issue is that the default `limit` seems to be 30, and not 50. Due to the
special case for `page == 1` and the `len(result_page) < limit` check, the
`url_json_get_all_pages` function may return before all pages have been loaded.

The fix is to simply remove the `limit` parameter. It wasn't used anyway.
Using it correctly is somewhat tricky if we can't pass in the limit in the
`page == 1` case. This may result in a couple more API requests but it's
probably not a problem in practice. If it becomes a problem, we should
figure out in which cases the `page == 1` special case is actually
required (it was not in the cases that I tested).

Note that the first link returns fewer results than the second link:
* https://projects.blender.org/api/v1/users/jacqueslucke/activities/feeds?only-performed-by=true&date=2024-04-22
* https://projects.blender.org/api/v1/users/jacqueslucke/activities/feeds?only-performed-by=true&date=2024-04-22&limit=50

Pull Request: https://projects.blender.org/blender/blender/pulls/120948
2024-04-28 01:06:51 +02:00
Campbell Barton
e5fb4ad03b Cleanup: replace %-formatting with str.format in tools/ & release/ 2024-04-27 16:06:53 +10:00
Campbell Barton
d4c7e6f020 Cleanup: suppress type warnings
Also make the script executable & clarify some variable names.
2024-04-03 10:41:03 +11:00
Falk David
03bcd7390a Formatting 2024-04-02 16:46:27 +02:00
Thomas Dinges
04293e2494 Tools: Add script to report (high) priority issues per module
The python script checks on reports based on the provided severity (default High) and sorts them per module.

Thanks to Sybren for suggestions on how to improve it!

Pull Request: https://projects.blender.org/blender/blender/pulls/120022
2024-04-02 15:54:14 +02:00
Campbell Barton
2e6739967e Cleanup: reduce right-shift in Python scripts
Also place the return type on it's own line as it's easier to identify
when it's in a predictable location instead of the line ending.
2024-02-28 11:02:54 +11:00
Campbell Barton
79cf4e58e4 Cleanup: type check scripts in tools/triage 2024-02-28 11:02:51 +11:00
Campbell Barton
4f8db2ee67 Cleanup: use static sets for contains checks, remove f-string use 2024-02-28 11:02:49 +11:00
Julian Eisel
13e93ac7f1 Tools: Don't include commits authored by others in weekly report script
So far this would include commits committed by the given user, but
authored by someone else. Unfotunately we can't use email addresses to
filter these out, since we can't get the email addresses associated with
an account from gitea, or do a user lookup by email. In my testing the
commit author email and the publicly visible account email would
mismatch in most cases.
2024-02-26 14:29:32 +01:00
Julian Eisel
2a08055066 Tools: Don't include merge commits in weekly report script output
These don't add any useful information to reports, they are just noise.
2024-02-26 12:09:30 +01:00
Julian Eisel
7032933094 Tools: Improve PR headings in weekly report script
"Pull" is a weird/confusing term, just use the proper name "Pull
Request".
2024-02-26 11:57:08 +01:00
Julian Eisel
57db30ce75 Tools: Correct formatting of PRs in weekly report script
Match the formatting of commits.
2024-02-26 11:52:48 +01:00
Julian Eisel
df8706a9af Tools: Fix missing PR reviews in weekly reports script
The script would only include PRs that were commented on as "reviewed",
not PRs that were either approved or had changes requested.
2024-02-26 11:13:04 +01:00
Aaron Carlisle
c892260b09 Fix: Formatting
Fixes formatting in abb9fc9b2f
2024-01-14 00:19:53 -05:00
Aaron Carlisle
abb9fc9b2f Tools: Weekly report script ignore commits to .profile repo
Weekly report commits should not be in the list of commits
2024-01-13 20:09:08 -05:00
Julian Eisel
be87aa6709 Tools: Match required header formatting for weekly report script
The formatting should follow a specific format, see
https://devtalk.blender.org/t/weekly-reports-2024-new-structure/32725.
2024-01-08 13:03:18 +01:00
Julian Eisel
2db0dd6542 Tools: Weekly report script option for weeks further in the past
Adds a `--weeks-ago` option to be able to control which week the report
should be made for. In practice people sometimes need to create reports
for a few weeks ago or for the current week.
2024-01-08 12:32:46 +01:00
Julian Eisel
d71f1ce95f Tools: Update weekly report script to use Gitea Markdown syntax
Update for the changed way to host weekly reports, they should now live
on projects.blender.org using Gitea Markdown syntax. See
https://devtalk.blender.org/t/weekly-reports-2024-new-structure/32725.
2024-01-08 12:09:49 +01:00