()
| 476 | } |
| 477 | |
| 478 | func (t defaultsTarget) variablesEndpoint() string { |
| 479 | switch t.scope { |
| 480 | case defaultsScopeRepo: |
| 481 | return fmt.Sprintf("repos/%s/%s/actions/variables", t.repoOwner, t.repoName) |
| 482 | case defaultsScopeOrg: |
| 483 | return fmt.Sprintf("orgs/%s/actions/variables", t.org) |
| 484 | default: |
| 485 | return fmt.Sprintf("enterprises/%s/actions/variables", t.enterprise) |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | func (t defaultsTarget) variableEndpoint(name string) string { |
| 490 | return fmt.Sprintf("%s/%s", t.variablesEndpoint(), url.PathEscape(name)) |
no outgoing calls