Fix internal tracker update
This commit is contained in:
parent
c39ddc490f
commit
fd87042003
1 changed files with 3 additions and 2 deletions
5
main.py
5
main.py
|
@ -6,16 +6,17 @@ BASE_URL = "https://git.augendre.info/api/v1"
|
|||
def main():
|
||||
session = requests.Session()
|
||||
session.headers.update({"Authorization": f"token {GITEA_TOKEN}"})
|
||||
res = session.get(f"{BASE_URL}/user/repos", params={"limit": 1})
|
||||
res = session.get(f"{BASE_URL}/user/repos", params={"limit": 40})
|
||||
repos = res.json()
|
||||
|
||||
for repo in repos:
|
||||
full_name = repo["full_name"]
|
||||
url = f"{BASE_URL}/repos/{full_name}"
|
||||
res = session.patch(url, json={
|
||||
'has_issues': True,
|
||||
'internal_tracker': {'enable_time_tracker': False, 'allow_only_contributors_to_track_time': True, 'enable_issue_dependencies': True}
|
||||
})
|
||||
print(res.json())
|
||||
print(full_name, res.status_code)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in a new issue