Skip to content

Commit

Permalink
chore: revert to original way of determining git branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jan 16, 2020
1 parent fcebafa commit bafc850
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pact_broker/client/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
module PactBroker
module Client
module Git
COMMAND = 'git branch --remote --verbose --no-abbrev --contains'.freeze
COMMAND = 'git name-rev --name-only HEAD'.freeze
BRANCH_ENV_VAR_NAMES = %w{BUILDKITE_BRANCH CIRCLE_BRANCH TRAVIS_BRANCH GIT_BRANCH GIT_LOCAL_BRANCH APPVEYOR_REPO_BRANCH CI_COMMIT_REF_NAME}.freeze

def self.branch
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/pact_broker/client/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module Git

context "when there is no known environment variable for the branch", skip_ci: true do
it "attempts to execute a git command to determine the value" do
expect { subject }.to_not raise_error
expect(subject).to_not be_empty
end
end

Expand Down

0 comments on commit bafc850

Please sign in to comment.