Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

migueldiascosta
Copy link
Member

fixes #3501

@migueldiascosta migueldiascosta added this to the 4.3.2 milestone Nov 16, 2020
@migueldiascosta
Copy link
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
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
Member Author

@migueldiascosta Is this still WIP?

No, forgot to re-edit the title

@@ -1331,6 +1331,9 @@ def merge_pr(pr):
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
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
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
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
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