Documentation
¶
Overview ¶
Package github_script provides a typed wrapper for actions/github-script.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubScript ¶
type GithubScript struct {
// The script to run. Required.
Script string `yaml:"script,omitempty"`
// The GitHub token to use for authentication. Defaults to github.token.
GithubToken string `yaml:"github-token,omitempty"`
// Whether to enable debug logging.
Debug bool `yaml:"debug,omitempty"`
// An optional user-agent string.
UserAgent string `yaml:"user-agent,omitempty"`
// A comma-separated list of API previews to accept.
Previews string `yaml:"previews,omitempty"`
// How the result will be encoded. Can be "string" or "json".
ResultEncoding string `yaml:"result-encoding,omitempty"`
// The number of times to retry a request.
Retries int `yaml:"retries,omitempty"`
// A comma-separated list of status codes that will NOT be retried.
RetryExemptStatusCodes string `yaml:"retry-exempt-status-codes,omitempty"`
}
GithubScript wraps the actions/github-script@v7 action. Run JavaScript in your workflows using the GitHub API and workflow contexts.
func (GithubScript) Action ¶
func (a GithubScript) Action() string
Action returns the action reference.
func (GithubScript) Inputs ¶
func (a GithubScript) Inputs() map[string]any
Inputs returns the action inputs as a map.
Click to show internal directories.
Click to hide internal directories.