(client *api.Client, repo ghrepo.Interface, variableName, value string)
| 120 | } |
| 121 | |
| 122 | func postRepoVariable(client *api.Client, repo ghrepo.Interface, variableName, value string) error { |
| 123 | payload := setPayload{ |
| 124 | Name: variableName, |
| 125 | Value: value, |
| 126 | } |
| 127 | path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "actions", "variables") |
| 128 | if err != nil { |
| 129 | return err |
| 130 | } |
| 131 | return postVariable(client, repo.RepoHost(), path, payload) |
| 132 | } |
| 133 | |
| 134 | func patchVariable(client *api.Client, host string, path safeurl.SafeURL, payload any) error { |
| 135 | payloadBytes, err := json.Marshal(payload) |
no test coverage detected