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

Commit 37d1cd7

Browse files
committed
populate file head_sha instead of branch_sha
1 parent dbd4c0e commit 37d1cd7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ git config --get pullrequest.userlogin # returns the github user login for the
128128

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

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

133133
#### Parameters
134134

assets/lib/commands/in.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def output
3131
echo "#{pr['head']['ref']}" > branch
3232
echo "#{pr['base']['ref']}" > base_branch
3333
echo "#{pr['base']['user']['login']}" > userlogin
34-
echo "#{pr['head']['sha']}" > branch_sha
34+
echo "#{pr['head']['sha']}" > head_sha
3535
BASH
3636
end
3737

spec/commands/in_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def dest_dir
114114
end
115115

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

0 commit comments

Comments
 (0)