-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add support for open-source workflows #103
Comments
I like this. These commands already receive an argument ( I'm worried about trying to pack so many features into the same tool. Does it make sense to build a copy of reflow and repurpose it for opensource? It could have it's own name and stay very focused on this particular workflow. |
Hmmm... maybe this would be a good time to introduce the idea of a So you could define a file that has a bunch of before/after calls that can target the core workflow (the basic reflow commands) as well as target other workflows. An example of what I have in mind: # Core workflow
commands :setup, :start, :review, :status, :stage, :deliver
start(branch_name) do
run_command_with_label 'git pull origin', { GitReflow.current_branch }
run_command_with_label 'git push origin', { "#{GitReflow.current_branch}:refs/heads/#{branch_name}" }
run_command_with_label 'git checkout --track -b', { "#{branch_name} origin/#{branch_name}" }
end
# ... other commands would go after this Then to create the opensource workflow: # Open-source workflow
require 'git_reflow/workflows/core' # would setup all default commands
replace(:start) do
# ... commands to run instead of git-reflow core
end
before(:start) do
# ... do something else here
end
after(:start) do
# ... do something else here
end |
I think this would be a great push for a big |
Damn it would be cool if we could make it that simple. Any idea on how we can offer an out of the box experience that let's people use it for opensource in less than say 45 seconds? |
Isn't that what GitHub is for? 😜 |
Here's what we do now: https://github.com/dart-lang/sdk/wiki/Merging-a-PR-contribution Would be great to have something similar (and easier) from reflow. |
We are implementing the workflow feature now at @invoice2go, will have a PR for review, based on the example given by @codenamev within a few days. |
This feature needs to account for both the external contributor (the one doing the forking) and the members of the project (that do the merging of the PR).
Starting a new task from an opensource project (external contributor):
git reflow start opensource-user/opensource-project
git reflow review
would squash commits and then submit a cross-fork pull-requestgit reflow deliver
would check for merge of PR on base-repo, and then cleanup the local repo's feature branch as usualDelivering (project member merging PR)
When merging down pull requests on opensource projects, it currently loses track of the original author since we're squash-merging the commits. We'll need some sort of way to retain the attribution to the original author (maybe using
--author
for the final commit?)git reflow deliver external_contributor_username/project_name
(doing this will perform the following)git remote add remote_user_of_pull
git fetch remote_user_of_pull
git checkout master
git pull origin master
git merge --squash remote_user_of_pull/branch_of_pull
git commit --author "Author of PULL <[email protected]>"
git push origin master
git remote rm remote_user_of_pull
We'll want to implement this as a Custom Workflow and added to the other workflows here.
The text was updated successfully, but these errors were encountered: