git_reflow 0.8.10 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/multi-ruby-tests.yml +33 -0
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -1
- data/Appraisals +1 -6
- data/CHANGELOG.md +466 -348
- data/Gemfile.lock +100 -70
- data/LICENSE +20 -20
- data/README.md +36 -12
- data/Rakefile +15 -8
- data/Workflow +3 -0
- data/bin/console +7 -7
- data/bin/setup +6 -6
- data/exe/git-reflow +14 -30
- data/git_reflow.gemspec +25 -24
- data/lib/git_reflow.rb +3 -14
- data/lib/git_reflow/config.rb +52 -17
- data/lib/git_reflow/git_helpers.rb +69 -22
- data/lib/git_reflow/git_server/base.rb +68 -68
- data/lib/git_reflow/git_server/git_hub.rb +53 -40
- data/lib/git_reflow/git_server/git_hub/pull_request.rb +25 -17
- data/lib/git_reflow/git_server/pull_request.rb +19 -3
- data/lib/git_reflow/merge_error.rb +9 -9
- data/lib/git_reflow/rspec.rb +1 -0
- data/lib/git_reflow/rspec/command_line_helpers.rb +23 -6
- data/lib/git_reflow/rspec/stub_helpers.rb +13 -13
- data/lib/git_reflow/rspec/workflow_helpers.rb +18 -0
- data/lib/git_reflow/sandbox.rb +16 -6
- data/lib/git_reflow/version.rb +1 -1
- data/lib/git_reflow/workflow.rb +305 -10
- data/lib/git_reflow/workflows/FlatMergeWorkflow +38 -0
- data/lib/git_reflow/workflows/core.rb +208 -79
- data/spec/fixtures/authentication_failure.json +3 -0
- data/spec/fixtures/awesome_workflow.rb +2 -6
- data/spec/fixtures/git/git_config +7 -7
- data/spec/fixtures/issues/comment.json.erb +27 -27
- data/spec/fixtures/issues/comments.json +29 -29
- data/spec/fixtures/issues/comments.json.erb +15 -15
- data/spec/fixtures/pull_requests/comment.json.erb +45 -45
- data/spec/fixtures/pull_requests/comments.json +47 -47
- data/spec/fixtures/pull_requests/comments.json.erb +15 -15
- data/spec/fixtures/pull_requests/commits.json +29 -29
- data/spec/fixtures/pull_requests/external_pull_request.json +145 -145
- data/spec/fixtures/pull_requests/pull_request.json +142 -142
- data/spec/fixtures/pull_requests/pull_request.json.erb +142 -142
- data/spec/fixtures/pull_requests/pull_request_branch_nonexistent_error.json +32 -0
- data/spec/fixtures/pull_requests/pull_request_exists_error.json +32 -32
- data/spec/fixtures/pull_requests/pull_requests.json +136 -136
- data/spec/fixtures/repositories/commit.json +53 -53
- data/spec/fixtures/repositories/commit.json.erb +53 -53
- data/spec/fixtures/repositories/commits.json.erb +13 -13
- data/spec/fixtures/repositories/statuses.json +31 -31
- data/spec/fixtures/users/user.json +32 -0
- data/spec/lib/git_reflow/git_helpers_spec.rb +115 -12
- data/spec/lib/git_reflow/git_server/git_hub/pull_request_spec.rb +6 -6
- data/spec/lib/git_reflow/git_server/git_hub_spec.rb +77 -3
- data/spec/lib/git_reflow/git_server/pull_request_spec.rb +41 -7
- data/spec/lib/git_reflow/workflow_spec.rb +259 -14
- data/spec/lib/git_reflow/workflows/core_spec.rb +224 -65
- data/spec/lib/git_reflow/workflows/flat_merge_spec.rb +17 -6
- data/spec/lib/git_reflow_spec.rb +2 -25
- data/spec/spec_helper.rb +3 -0
- data/spec/support/github_helpers.rb +1 -1
- data/spec/support/mock_pull_request.rb +17 -17
- data/spec/support/web_mocks.rb +39 -39
- metadata +52 -53
- data/circle.yml +0 -26
- data/lib/git_reflow/commands/deliver.rb +0 -10
- data/lib/git_reflow/commands/refresh.rb +0 -20
- data/lib/git_reflow/commands/review.rb +0 -13
- data/lib/git_reflow/commands/setup.rb +0 -11
- data/lib/git_reflow/commands/stage.rb +0 -9
- data/lib/git_reflow/commands/start.rb +0 -18
- data/lib/git_reflow/commands/status.rb +0 -7
- data/lib/git_reflow/workflows/flat_merge.rb +0 -10
- data/spec/fixtures/workflow_with_super.rb +0 -8
data/circle.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
dependencies:
|
2
|
-
cache_directories:
|
3
|
-
- '~/.rvm/rubies'
|
4
|
-
- 'vendor'
|
5
|
-
|
6
|
-
override:
|
7
|
-
- >
|
8
|
-
case $CIRCLE_NODE_INDEX in
|
9
|
-
0)
|
10
|
-
rvm-exec 2.3.7 gem install bundler
|
11
|
-
rvm-exec 2.3.7 bash -c "bundle check --path=vendor/bundle_2.1 || bundle install --path=vendor/bundle_2.2"
|
12
|
-
;;
|
13
|
-
1)
|
14
|
-
rvm-exec 2.4.4 gem install bundler
|
15
|
-
rvm-exec 2.4.4 bash -c "bundle check --path=vendor/bundle_2.2 || bundle install --path=vendor/bundle_2.3"
|
16
|
-
;;
|
17
|
-
2)
|
18
|
-
rvm-exec ruby-head gem install bundler
|
19
|
-
rvm-exec ruby-head bash -c "bundle check --path=vendor/bundle_head || bundle install --path=vendor/bundle_head"
|
20
|
-
;;
|
21
|
-
esac
|
22
|
-
|
23
|
-
test:
|
24
|
-
override:
|
25
|
-
- case $CIRCLE_NODE_INDEX in 0) rvm-exec 2.3.7 bundle exec rake ;; 1) rvm-exec 2.4.4 bundle exec rake ;; 2) rvm-exec ruby-head bundle exec rake ;; esac:
|
26
|
-
parallel: true
|
@@ -1,10 +0,0 @@
|
|
1
|
-
desc 'deliver your feature branch'
|
2
|
-
long_desc 'merge your feature branch down to your base branch, and cleanup your feature branch'
|
3
|
-
|
4
|
-
command :deliver do |c|
|
5
|
-
c.desc 'merge your feature branch down to your base branch, and cleanup your feature branch'
|
6
|
-
c.switch [:f, :'skip-lgtm'], desc: 'skip the lgtm checks and deliver your feature branch'
|
7
|
-
c.action do |global_options, options, args|
|
8
|
-
GitReflow.deliver base: args[0], force: options[:'skip-lgtm']
|
9
|
-
end
|
10
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
desc 'Updates and synchronizes your base branch and feature branch.'
|
2
|
-
long_desc <<LONGTIME
|
3
|
-
Performs the following:\n
|
4
|
-
\t$ git checkout <base_branch>\n
|
5
|
-
\t$ git pull <remote_location> <base_branch>\n
|
6
|
-
\t$ git checkout <current_branch>\n
|
7
|
-
\t$ git pull origin <current_branch>\n
|
8
|
-
\t$ git merge <base_branch>\n
|
9
|
-
LONGTIME
|
10
|
-
arg_name '[remote_location] - remote repository name to fetch updates from (origin by default), [base_branch] - branch that you want to merge with (master by default)'
|
11
|
-
command :refresh do |c|
|
12
|
-
c.desc 'updates base_branch based on remote and merges the base with your feature_branch'
|
13
|
-
c.flag [:r,:remote], default_value: 'origin'
|
14
|
-
c.flag [:b,:base], default_value: 'master'
|
15
|
-
c.action do |global_options, options, args|
|
16
|
-
|
17
|
-
GitReflow.refresh base: options[:base], remote: options[:remote]
|
18
|
-
|
19
|
-
end
|
20
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
desc 'review will push your latest feature branch changes to your remote repo and create a pull request'
|
2
|
-
arg_name 'Describe arguments to review here'
|
3
|
-
command :review do |c|
|
4
|
-
c.desc 'push your latest feature branch changes to your remote repo and create a pull request against the destination branch'
|
5
|
-
c.arg_name '[destination_branch] - the branch you want to merge your feature branch into'
|
6
|
-
c.flag [:t, :title]
|
7
|
-
c.flag [:m, :message]
|
8
|
-
c.action do |global_options,options,args|
|
9
|
-
|
10
|
-
GitReflow.review base: args[0], title: options[:title], body: options[:message]
|
11
|
-
|
12
|
-
end
|
13
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
desc 'Setup your GitHub account'
|
2
|
-
command :setup do |c|
|
3
|
-
c.desc 'sets up your api token with GitHub'
|
4
|
-
c.switch [:l, :local], default_value: false, desc: 'setup GitReflow for the current project only'
|
5
|
-
c.switch [:e, :enterprise], default_value: false, desc: 'setup GitReflow with a Github Enterprise account'
|
6
|
-
c.action do |global_options, options, args|
|
7
|
-
|
8
|
-
GitReflow.setup local: options[:local], enterprise: options[:enterprise]
|
9
|
-
|
10
|
-
end
|
11
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
|
2
|
-
desc 'Start will create a new feature branch and setup remote tracking'
|
3
|
-
long_desc <<LONGTIME
|
4
|
-
Performs the following:\n
|
5
|
-
\t$ git checkout <base_branch>\n
|
6
|
-
\t$ git pull origin <base_branch>\n
|
7
|
-
\t$ git push origin <base_branch>:refs/heads/[new_feature_branch]\n
|
8
|
-
\t$ git checkout --track -b [new_feature_branch] origin/[new_feature_branch]\n
|
9
|
-
LONGTIME
|
10
|
-
arg_name '[new-feature-branch-name] - name of the new feature branch'
|
11
|
-
command :start do |c|
|
12
|
-
c.flag [:b,:base], default_value: 'master'
|
13
|
-
c.action do |global_options, options, args|
|
14
|
-
|
15
|
-
GitReflow.start feature_branch: args[0], base: options[:base]
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
desc 'Display information about the status of your feature in the review process'
|
2
|
-
arg_name "destination_branch - the branch you're merging your feature into ('master' is default)"
|
3
|
-
command :status do |c|
|
4
|
-
c.action do |global_options, options, args|
|
5
|
-
GitReflow.status destination_branch: args[0]
|
6
|
-
end
|
7
|
-
end
|