I'm using go-github in conjunction with GitHub Actions + Deployments.
During deployments we update the deployment status and provide a log_url value that points back to the current GitHub actions URL.
We then use github.Client.Repositories.ListDeploymentStatuses to retrieve the statuses to retrieve the log URL.
There are a few issues that I can see:
- The
ListDeploymentStatuses method doesn't contain preview headers. (though GetDeploymentStatus does contain the headers)
- The
DeploymentStatus type doesn't have all available fields so if you provide the headers it won't parse them anyway.
- The response body seems to be closed before its returned to the requester so we can't manually parse the raw JSON response.
I'm using
go-githubin conjunction with GitHub Actions + Deployments.During deployments we update the deployment status and provide a
log_urlvalue that points back to the current GitHub actions URL.We then use
github.Client.Repositories.ListDeploymentStatusesto retrieve the statuses to retrieve the log URL.There are a few issues that I can see:
ListDeploymentStatusesmethod doesn't contain preview headers. (thoughGetDeploymentStatusdoes contain the headers)DeploymentStatustype doesn't have all available fields so if you provide the headers it won't parse them anyway.