()
| 40 | } |
| 41 | |
| 42 | func (g *GitHub) Trigger() error { |
| 43 | body := github.CreateWorkflowDispatchEventRequest{ |
| 44 | Ref: g.data.Ref, |
| 45 | Inputs: nil, |
| 46 | } |
| 47 | response, err := g.client.Actions.CreateWorkflowDispatchEventByFileName(g.ctx, g.data.OrgName, g.data.RepoName, g.data.WorkflowFileName, body) |
| 48 | if err != nil { |
| 49 | return err |
| 50 | } |
| 51 | return util.Check2xxCode(response.StatusCode) |
| 52 | } |
| 53 | |
| 54 | func (g *GitHub) GetStatusUrl() (string, error) { |
| 55 | return fmt.Sprintf("https://github.com/%s/%s/actions/workflows/%s", g.data.OrgName, g.data.RepoName, g.data.WorkflowFileName), nil |
nothing calls this directly
no test coverage detected