mirror of
https://codeberg.org/fediverse/fep.git
synced 2026-08-05 11:46:04 +00:00
16acf44939
This pull requests contains the basic automation scripts as described in `ISSUE_TEMPLATES/README.md`. Feps needed to be changed to continue links to their tracking issues. - [x] Description of how to best merge a pull request still missing - [x] Rename folder ISSUE_TEMPLATES to something better. Co-authored-by: Helge <helge.krueger@gmail.com> Reviewed-on: https://codeberg.org/fediverse/fep/pulls/117
28 lines
685 B
Python
28 lines
685 B
Python
from argparse import ArgumentParser
|
|
from datetime import date, timedelta
|
|
from tools import FepFile
|
|
|
|
|
|
import json
|
|
import requests
|
|
|
|
parser = ArgumentParser("Pullrequest")
|
|
parser.add_argument("pr", help="Pull request id")
|
|
args = parser.parse_args()
|
|
|
|
with open("ISSUE_TEMPLATE/config.json") as f:
|
|
config = json.load(f)
|
|
print(
|
|
f"https://codeberg.org/api/v1/repos/{config['owner']}/{config['repo']}/pulls/{args.pr}"
|
|
)
|
|
response = requests.get(
|
|
f"https://codeberg.org/api/v1/repos/{config['owner']}/{config['repo']}/pulls/{args.pr}",
|
|
headers={"authorization": f"Bearer {config['token']}"},
|
|
)
|
|
|
|
print(response)
|
|
print(response.text)
|
|
|
|
|
|
print(json.dumps(response.json(), indent=2))
|