Documentation ¶
Index ¶
- Constants
- func GetAndUnmarshalUrl(jenkinsUrl, username, password string, unmarshalTo interface{}) (int, error)
- func IsStatusCodeOK(statusCode int) bool
- func NewGitHubClient(ctx context.Context, token string) *github.Client
- func NewJiraClient(baseURL string) (*jira.Client, error)
- func SchemaToJiraIssue(schema *JiraIssueSchema, currentSprintID int) (*jira.Issue, error)
- type GitHubIssueSchema
- type JenkinsBuild
- type JenkinsListView
- type JiraConfig
- type JiraIssueSchema
- type JiraUser
- type JiraVersion
Constants ¶
View Source
const ( GitHubTokenEnvVar = "GITHUB_TOKEN" JiraTokenEnvVar = "JIRA_TOKEN" StoryPointsCustomField = "customfield_12310243" OpenShiftPipelinesProject = "SRVKP" )
Variables ¶
This section is empty.
Functions ¶
func GetAndUnmarshalUrl ¶
func IsStatusCodeOK ¶
func NewJiraClient ¶
func SchemaToJiraIssue ¶
func SchemaToJiraIssue(schema *JiraIssueSchema, currentSprintID int) (*jira.Issue, error)
Types ¶
type GitHubIssueSchema ¶
func GitHubIssueSchemaFromURL ¶
func GitHubIssueSchemaFromURL(urlString string) (*GitHubIssueSchema, error)
type JenkinsBuild ¶
type JenkinsBuild struct { Actions []struct { Class string `json:"_class,omitempty"` Parameters []struct { Class string `json:"_class"` Name string `json:"name"` Value interface{} `json:"value"` } `json:"parameters,omitempty"` Causes []struct { Class string `json:"_class"` ShortDescription string `json:"shortDescription"` UpstreamBuild int `json:"upstreamBuild"` UpstreamProject string `json:"upstreamProject"` UpstreamUrl string `json:"upstreamUrl"` } `json:"causes"` } `json:"actions"` Building bool `json:"building"` Duration int `json:"duration"` FullDisplayName string `json:"fullDisplayName"` ID string `json:"id"` Number int `json:"number"` Result string `json:"result"` Timestamp int64 `json:"timestamp"` URL string `json:"url"` PreviousBuild struct { Number int `json:"number"` URL string `json:"url"` } `json:"previousBuild"` }
func GetBuildJson ¶
func GetBuildJson(buildURL, username, password string) (*JenkinsBuild, int, error)
GetBuildJson returns Build, status code, error
type JenkinsListView ¶
type JenkinsListView struct { Class string `json:"_class"` Description string `json:"description"` Jobs []struct { Class string `json:"_class"` Name string `json:"name"` URL string `json:"url"` Color string `json:"color"` } `json:"jobs"` Name string `json:"name"` Property []interface{} `json:"property"` URL string `json:"url"` }
func GetListViewJson ¶
func GetListViewJson(listViewUrl, username, password string) (*JenkinsListView, error)
type JiraConfig ¶
type JiraIssueSchema ¶
type JiraVersion ¶
func GetVersion ¶
func GetVersion(jiraClient *jira.Client, jiraConfig *JiraConfig, version string) (*JiraVersion, error)
func GetVersions ¶
func GetVersions(jiraClient *jira.Client, jiraConfig *JiraConfig) ([]JiraVersion, error)
Click to show internal directories.
Click to hide internal directories.