Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Commit

Permalink
populate file head_sha instead of branch_sha
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearnic committed Sep 15, 2017
1 parent dbd4c0e commit 37d1cd7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ git config --get pullrequest.userlogin # returns the github user login for the

* `.git/user_login`: the user login of the pull request author

* `.git/branch_sha`: the latest commit hash of the branch associated with the pull request
* `.git/head_sha`: the latest commit hash of the branch associated with the pull request

#### Parameters

Expand Down
2 changes: 1 addition & 1 deletion assets/lib/commands/in.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def output
echo "#{pr['head']['ref']}" > branch
echo "#{pr['base']['ref']}" > base_branch
echo "#{pr['base']['user']['login']}" > userlogin
echo "#{pr['head']['sha']}" > branch_sha
echo "#{pr['head']['sha']}" > head_sha
BASH
end

Expand Down
2 changes: 1 addition & 1 deletion spec/commands/in_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def dest_dir
end

it 'creates a file that includes the hash of the branch in the .git folder' do
value = File.read(File.join(dest_dir,'.git','branch_sha')).strip()
value = File.read(File.join(dest_dir,'.git','head_sha')).strip()
expect(value).to eq 'hash'
end

Expand Down

0 comments on commit 37d1cd7

Please sign in to comment.