Skip to content

check if PR is already merged in --merge-pr#3502

Merged
boegel merged 4 commits intoeasybuilders:developfrom
migueldiascosta:merge_pr_check_already_merged
Nov 28, 2020
Merged

check if PR is already merged in --merge-pr#3502
boegel merged 4 commits intoeasybuilders:developfrom
migueldiascosta:merge_pr_check_already_merged

Conversation

@migueldiascosta
Copy link
Copy Markdown
Member

fixes #3501

@migueldiascosta migueldiascosta added this to the 4.3.2 milestone Nov 16, 2020
@migueldiascosta
Copy link
Copy Markdown
Member Author

hm, I suppose this will break tests that use merged PRs...

@migueldiascosta migueldiascosta changed the title check if PR is already merged in --merge-pr check if PR is already merged in --merge-pr (WIP) Nov 16, 2020
@boegel
Copy link
Copy Markdown
Member

boegel commented Nov 25, 2020

@migueldiascosta Is this still WIP?

@migueldiascosta migueldiascosta changed the title check if PR is already merged in --merge-pr (WIP) check if PR is already merged in --merge-pr Nov 25, 2020
@migueldiascosta
Copy link
Copy Markdown
Member Author

@migueldiascosta Is this still WIP?

No, forgot to re-edit the title

Comment thread easybuild/tools/github.py Outdated
force = build_option('force')
dry_run = build_option('dry_run') or build_option('extended_dry_run')

if pr_data['merged'] and not dry_run:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also take into account closed PRs?

Also, why doesn't this make the merge_pr test in test/framework/options.py fail?

Copy link
Copy Markdown
Member Author

@migueldiascosta migueldiascosta Nov 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also take into account closed PRs?

will do

Also, why doesn't this make the merge_pr test in test/framework/options.py fail?

that's why I added the and not dry_run

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the test so it tries --merge-pr without dry run on a merged/closed PR to cover this change in the tests?

Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit 43dfcc6 into easybuilders:develop Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--merge-pr causes a traceback when the PR is already merged

2 participants