Skip to content

Commit

Permalink
Update GetCommits docs (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerzi authored Aug 13, 2023
1 parent e1ade55 commit 1be72d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- [ ] All [tests](https://github.com/jfrog/froggit-go/actions/workflows/test.yml) passed. If this feature is not already covered by the tests, I added new tests.
- [ ] I used `go fmt ./...` for formatting the code before submitting the pull request.
- [ ] This feature is included on all supported VCS providers - GitHub, Bitbucket cloud, Bitbucket server, GitLab and Azure Repos.
- [ ] I added the relevant documentation for the new feature.

---
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Currently supported providers are: [GitHub](#github), [Bitbucket Server](#bitbuc
- [List Open Pull Requests With Body](#list-open-pull-requests-with-body)
- [Add Pull Request Comment](#add-pull-request-comment)
- [List Pull Request Comments](#list-pull-request-comments)
- [Get Commits](#get-commits)
- [Get Latest Commit](#get-latest-commit)
- [Get Commit By SHA](#get-commit-by-sha)
- [Get List of Modified Files](#get-list-of-modified-files)
Expand Down Expand Up @@ -431,6 +432,22 @@ pullRequestID := 5
pullRequestComments, err := client.ListPullRequestComment(ctx, owner, repository, pullRequestID)
```

#### Get Commits

```go
// Go context
ctx := context.Background()
// Organization or username
owner := "jfrog"
// VCS repository
repository := "jfrog-cli"
// VCS branch
branch := "dev"

// Commits information of the latest branch commits
commitInfo, err := client.GetCommits(ctx, owner, repository, branch)
```

#### Get Latest Commit

```go
Expand Down

0 comments on commit 1be72d7

Please sign in to comment.