Skip to content

Commit 9633e5f

Browse files
authored
Fix docathon-label-sync.py to not fail on PRs without description (#2379)
See https://github.com/pytorch/tutorials/actions/runs/5140794478/jobs/9252588225?pr=2377 as an example
1 parent c5501e7 commit 9633e5f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: .github/scripts/docathon-label-sync.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ def main():
1414
repo = g.get_repo(f'{repo_owner}/{repo_name}')
1515
pull_request = repo.get_pull(pull_request_number)
1616
pull_request_body = pull_request.body
17+
# PR without description
18+
if pull_request_body is None:
19+
return
1720

1821
# get issue number from the PR body
1922
if not re.search(r'#\d{1,5}', pull_request_body):

0 commit comments

Comments
 (0)