Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub CommitListOptions Parameter is Out of Date #76

Open
blueworrybear opened this issue Sep 20, 2020 · 0 comments · May be fixed by #94
Open

GitHub CommitListOptions Parameter is Out of Date #76

blueworrybear opened this issue Sep 20, 2020 · 0 comments · May be fixed by #94

Comments

@blueworrybear
Copy link

It seems to me that one of Git.ListCommits arguments CommitListOptions requires updating.
It uses ref to query commits from branch, but the GitHub official documentation (List Commits Parameters) says the query parameter should be sha

func encodeCommitListOptions(opts scm.CommitListOptions) string {
	params := url.Values{}
	if opts.Page != 0 {
		params.Set("page", strconv.Itoa(opts.Page))
	}
	if opts.Size != 0 {
		params.Set("per_page", strconv.Itoa(opts.Size))
	}
	if opts.Ref != "" {
		params.Set("ref", opts.Ref)
	}
	return params.Encode()
}

Using ref to query branch commits will always return commits from default (master) branch.
Please let me know if I am wrong. I could also create PR to update it if needed.

jstrachan pushed a commit to jstrachan/go-scm that referenced this issue Dec 22, 2020
feat: Move internal/hmac to pkg/
@Yshayy Yshayy linked a pull request Jan 21, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant