Files
test2/tools/triage/issues_needing_info.py
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00

75 lines
2.0 KiB
Python

#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2023 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
"""
# This script prints the URLs of all opened issues labeled
# "Status/Needs Information from User" by the specified user
# and last updated more than 7 days ago.
Example usage:
python ./issues_needing_info.py --username mano-wii
"""
import argparse
import datetime
from gitea_utils import gitea_json_issues_search, gitea_json_issue_events_filter, git_username_detect
def print_needing_info_urls(username, before):
print(f"Needs information from user before {before}:")
label = "Status/Needs Information from User"
issues_json = gitea_json_issues_search(type="issues",
state="open",
before=before,
labels=label,
verbose=True)
for issue in issues_json:
fullname = issue["repository"]["full_name"]
number = issue["number"]
issue_events = gitea_json_issue_events_filter(
f"{fullname}/issues/{number}",
username=username,
labels={label})
if issue_events:
print(issue["html_url"])
print("concluded")
def main() -> None:
parser = argparse.ArgumentParser(
description="Print URL of Issues Needing Info",
epilog="This script is typically used to help triaging")
parser.add_argument(
"--username",
dest="username",
type=str,
required=False,
help="Username registred in Gitea")
args = parser.parse_args()
username = args.username
if not username:
username = git_username_detect()
if not username:
return
before_date = datetime.datetime.now() - datetime.timedelta(7)
print_needing_info_urls(username, f"{before_date.isoformat()}Z")
if __name__ == "__main__":
main()
# wait for input to close window
input()