Lines Matching +full:repo +full:- +full:token

4 # SPDX-License-Identifier: Apache-2.0
8 This script searches for issues referenced via pull-requests in a release
21 -t ~/.ghtoken \
22 -b v2.7-branch \
23 -s 2021-12-15 -e 2022-04-22 \
24 -P 45074 -P 45868 -P 44918 -P 41234 -P 41174 \
25 -j | jq . | tee /tmp/backports.json
29 -b v3.0-branch \
30 -p 43381 \
31 -j | jq . | tee /tmp/backports.json
52 return datetime.strptime(arg_date_str, "%Y-%m-%d")
54 msg = "Given Date ({0}) not valid! Expected format, YYYY-MM-DD!".format(arg_date_str)
60 parser.add_argument('-t', '--token', dest='tokenfile',
61 …help='File containing GitHub token (alternatively, use GITHUB_TOKEN env variable)', metavar='FILE')
62 parser.add_argument('-b', '--base', dest='base',
63 … help='branch (base) for PRs (e.g. v2.7-branch)', metavar='BRANCH', required=True)
64 parser.add_argument('-j', '--json', dest='json', action='store_true',
66 parser.add_argument('-s', '--start', dest='start', help='start date (YYYY-mm-dd)',
68 parser.add_argument('-e', '--end', dest='end', help='end date (YYYY-mm-dd)',
70 parser.add_argument("-o", "--org", default="zephyrproject-rtos",
72 parser.add_argument('-p', '--include-pull', dest='includes',
75 parser.add_argument('-P', '--exclude-pull', dest='excludes',
78 parser.add_argument("-r", "--repo", default="zephyr",
86 'the --start argument should not be used with --include-pull')
90 'the --end argument should not be used with --include-pull')
95 'if --include-pr PR is not used, --start START_DATE is required')
108 token = file.read()
109 token = token.strip()
113 token = os.environ['GITHUB_TOKEN']
115 setattr(args, 'token', token)
121 def __init__(self, repo, base, pulls): argument
123 self._repo = repo
131 def by_date_range(repo, base, start_date, end_date, excludes): argument
132 """Create a Backport object with the provided repo,
138 unfiltered_pulls = repo.get_pulls(
158 return Backport(repo, base, pulls)
161 def by_included_prs(repo, base, includes): argument
162 """Create a Backport object with the provided repo,
169 p = repo.get_pull(i)
187 return Backport(repo, base, pulls)
198 # * :github:`38972` - logging: Cleaning references to tracing in logging
199 print(f'* :github:`{i.number}` - {title}')
230 match = re.search(r"^Fixes[:]?\s*#([1-9][0-9]*).*", line)
233 …ttps://github\.com/{self._repo.organization.login}/{self._repo.name}/issues/([1-9][0-9]*).*", line)
293 gh = Github(args.token)
299 repo = gh.get_repo(args.org + '/' + args.repo)
306 bp = Backport.by_included_prs(repo, args.base, set(args.includes))
308 bp = Backport.by_date_range(repo, args.base,
319 … f'\nhttps://github.com/{repo.organization.login}/{repo.name}/pull/{p.number}: {lst}')
329 f'https://github.com/{repo.organization.login}/{repo.name}/pull/{p.number}')