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

List workflow runs for a repository by SHA #2687

Closed
alexellis opened this issue Mar 3, 2023 · 1 comment · Fixed by #2703
Closed

List workflow runs for a repository by SHA #2687

alexellis opened this issue Mar 3, 2023 · 1 comment · Fixed by #2703
Assignees

Comments

@alexellis
Copy link
Contributor

Hi, I want to trigger a workflow for a given SHA, then query the ID of the run, to eventually collect the logs and status.

This is available in the API now, however the latest version of go-github doesn't have it available in the struct yet.

https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository

// ListWorkflowRunsOptions specifies optional parameters to ListWorkflowRuns.
type ListWorkflowRunsOptions struct {
	Actor   string `url:"actor,omitempty"`
	Branch  string `url:"branch,omitempty"`
	Event   string `url:"event,omitempty"`
	Status  string `url:"status,omitempty"`
	Created string `url:"created,omitempty"`
	ListOptions
}

I don't know how to contribute to this library, or whether external contributions are welcome/harder for the maintainers than adding this themselves.

What would be a good next step to get this in?

@gmlewis
Copy link
Collaborator

gmlewis commented Mar 6, 2023

I don't know how to contribute to this library, or whether external contributions are welcome/harder for the maintainers than adding this themselves.

We welcome and encourage people to contribute to this repo. Please start by reading CONTRIBUTING.md, then go ahead and submit your PR.

Thank you, @alexellis ! We look forward to your contributions!

alexellis added a commit to alexellis/go-github that referenced this issue Mar 8, 2023
GitHub added this option to the following API:

/repos/{owner}/{repo}/actions/runs

Only returns workflow runs that are associated with the specified
head_sha.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
gmlewis pushed a commit that referenced this issue Mar 8, 2023
exageraldo pushed a commit to exageraldo/go-github that referenced this issue Mar 13, 2023
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.

2 participants