view_sha: View the SHA for a commit

Description Usage Arguments Details Value Examples

View source: R/commits.R

Description

This function returns the commit SHA given a git reference. A reference can be either a SHA, branch or tag. If it is a branch then the head commit is used.

Usage

1
view_sha(ref, repo, ...)

Arguments

ref

(string) Either a SHA, branch or tag used to identify the commit.

repo

(string) The repository specified in the format: owner/repo.

...

Parameters passed to gh_request().

Details

For more details see the GitHub API documentation:

Value

view_sha() returns the commit SHA as a string.

Examples

1
2
3
4
5
6
7
## Not run: 

  view_sha("a-tag", repo = "ChadGoymer/githapi")
  view_sha("a-branch", repo = "ChadGoymer/githapi")


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.