MCPcopy Index your code
hub / github.com/cli/cli / postRepoVariable

Function postRepoVariable

pkg/cmd/variable/set/http.go:114–121  ·  view source on GitHub ↗
(client *api.Client, repo ghrepo.Interface, variableName, value string)

Source from the content-addressed store, hash-verified

112}
113
114func postRepoVariable(client *api.Client, repo ghrepo.Interface, variableName, value string) error {
115 payload := setPayload{
116 Name: variableName,
117 Value: value,
118 }
119 path := fmt.Sprintf(`repos/%s/actions/variables`, ghrepo.FullName(repo))
120 return postVariable(client, repo.RepoHost(), path, payload)
121}
122
123func patchVariable(client *api.Client, host, path string, payload interface{}) error {
124 payloadBytes, err := json.Marshal(payload)

Callers 1

setVariableFunction · 0.85

Calls 3

FullNameFunction · 0.92
postVariableFunction · 0.85
RepoHostMethod · 0.65

Tested by

no test coverage detected