diff --git a/README.md b/README.md index 8e1c6ff..6f8bbfa 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/assets/lib/commands/in.rb b/assets/lib/commands/in.rb index b066a39..ac8ffea 100755 --- a/assets/lib/commands/in.rb +++ b/assets/lib/commands/in.rb @@ -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 diff --git a/spec/commands/in_spec.rb b/spec/commands/in_spec.rb index 5cd535b..960c999 100644 --- a/spec/commands/in_spec.rb +++ b/spec/commands/in_spec.rb @@ -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