Skip to content

Commit

Permalink
action: fromlist: Fail if PR has changes requested
Browse files Browse the repository at this point in the history
Make sure we do not merge nacked fromlist commits.

Signed-off-by: Carles Cufi <[email protected]>
  • Loading branch information
carlescufi committed Nov 12, 2024
1 parent 0802cb7 commit 0b028e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions action.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ def fetch_pr(repo, prn, target):
if pr.state == 'closed':
die(f'PR #{prn} is closed and not merged')

for rev in pr.get_reviews():
if "CHANGES_REQUESTED" in rev.state:
die(f'PR #{prn} has requested changes')

shas = [c.sha for c in pr.get_commits()]
ref = f'nrf/pull/{prn}'
runc(f'git -C {target} fetch {repo.clone_url} pull/{prn}/head:{ref}')
Expand Down

0 comments on commit 0b028e1

Please sign in to comment.