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

cli: git-merge #362

Closed
tiborsimko opened this issue Aug 5, 2020 · 0 comments · Fixed by #364
Closed

cli: git-merge #362

tiborsimko opened this issue Aug 5, 2020 · 0 comments · Fixed by #364
Assignees
Projects

Comments

@tiborsimko
Copy link
Member

Introduce git-merge command that would complement git-checkout command.

Its purpose is to merge a set of PRs to master and possibly to push

Example workflow:

The integrator checks a set of PR:

$ reana-dev git-checkout --fetch \
                         -b r-w-controller 401 \
                         -b r-j-controller 302 \

When everything is working, the integrator would like to merge some of them to master:

$ reana-dev git-merge -b r-w-controller 401 -b r-j-controller 302 [--push]

This command should do, for each given repo:

  • git fetch upstream in given repositories to check whether local pr-401 branch is identical to upstream/pr/401 to prevent errors;
  • if we are up to date, do git merge --ff-only upstream/pr/401 to master
  • then delete locally checked out branch pr-401
  • optionally, when --push argument is used, the new master branch should be pushed to upstream and origin;
  • note that we already have git-push command which could be also amended for that effect (to add an option where to push, origin or upstream)

For example, I have been using the following alias:

merge-push-delete-pr = !sh -c 'git fetch upstream && git checkout master && git merge --ff-only upstream/master && git merge --ff-only upstream/pr/$1 && git branch -d pr-$1 && git push upstream master && git push origin master' -

The command would do something similar, but for a set of REANA components associated to a PR group.

Note: we could use simple git commands for now and investigate moving to gh command later (starting from git-fork and friends).

@tiborsimko tiborsimko added this to Ready for work in v0.7.0 Aug 5, 2020
@mvidalgarcia mvidalgarcia moved this from Ready for work to In work in v0.7.0 Aug 5, 2020
@mvidalgarcia mvidalgarcia self-assigned this Aug 5, 2020
mvidalgarcia added a commit to mvidalgarcia/reana that referenced this issue Aug 5, 2020
mvidalgarcia added a commit to mvidalgarcia/reana that referenced this issue Aug 5, 2020
@mvidalgarcia mvidalgarcia moved this from In work to In review in v0.7.0 Aug 6, 2020
mvidalgarcia added a commit to mvidalgarcia/reana that referenced this issue Aug 7, 2020
v0.7.0 automation moved this from In review to Done Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v0.7.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants