refactor, wip

This commit is contained in:
Cory Bennett
2016-10-01 00:48:42 -07:00
parent 070c38520b
commit a54a6eb2d0
37 changed files with 3620 additions and 223 deletions
+9
View File
@@ -0,0 +1,9 @@
package jiracli
import (
"gopkg.in/Netflix-Skunkworks/go-jira.v1/lib"
)
type JiraOptions struct {
jira.SearchOptions `yaml:",inline"`
}
+31
View File
@@ -0,0 +1,31 @@
package jiracli
import (
"os"
"gopkg.in/op/go-logging.v1"
)
var (
log = logging.MustGetLogger("jiracli")
defaultFormat = "%{color}%{time:2006-01-02T15:04:05.000Z07:00} %{level:-5s} [%{shortfile}]%{color:reset} %{message}"
)
func InitLogging() {
logBackend := logging.NewLogBackend(os.Stderr, "", 0)
format := os.Getenv("JIRA_LOG_FORMAT")
if format == "" {
format = defaultFormat
}
logging.SetBackend(
logging.NewBackendFormatter(
logBackend,
logging.MustStringFormatter(format),
),
)
logging.SetLevel(logging.NOTICE, "")
}
func VerboseLogging() {
logging.SetLevel(logging.GetLevel("")+1, "")
}
+52
View File
@@ -0,0 +1,52 @@
package jiracli
import (
"os"
"gopkg.in/Netflix-Skunkworks/go-jira.v1/lib"
"gopkg.in/alecthomas/kingpin.v2"
)
func usage() {
app := kingpin.New("jira", "Jira Command Line Client")
app.Writer(os.Stdout)
app.Version(jira.VERSION)
opts := &JiraOptions{}
// -b --browse Open your browser to the Jira issue
// -e --endpoint=URI URI to use for jira
// -k --insecure disable TLS certificate verification
// -h --help Show this usage
// -t --template=FILE Template file to use for output/editing
// -u --user=USER Username to use for authenticaion (default: %s)
// -v --verbose Increase output logging
listUsage(app, opts)
}
func listUsage(app *kingpin.Application, opts *JiraOptions) {
list := app.Command("list", "List Jira Issues")
list.Flag("assignee", "Username assigned the issue").Short('a').StringVar(&opts.Assignee)
list.Flag("component", "Component to use for query").Short('c').StringVar(&opts.Component)
list.Flag("queryfields", "Fields that are used for \"list\" template").Short('f').StringVar(&opts.QueryFields)
list.Flag("limit", "Maximum number of results to return in query").Short('l').IntVar(&opts.MaxResults)
list.Flag("project", "Project to use for query").Short('p').StringVar(&opts.Project)
list.Flag("query", "Jira Query Language expression for the search").Short('q').StringVar(&opts.Query)
list.Flag("reporter", "Reporter to use in query").Short('r').StringVar(&opts.Reporter)
list.Flag("sort", "Sort order used in query").Short('s').StringVar(&opts.Sort)
list.Flag("watcher", "Watcher to use in query").Short('w').StringVar(&opts.Watcher)
// -a --assignee=USER Username assigned the issue
// -c --component=COMPONENT Component to Search for
// -f --queryfields=FIELDS Fields that are used in "list" template: (default: %s)
// -i --issuetype=ISSUETYPE The Issue Type
// -l --limit=VAL Maximum number of results to return in query (default: %d)
// -p --project=PROJECT Project to Search for
// -q --query=JQL Jira Query Language expression for the search
// -r --reporter=USER Reporter to search for
// -s --sort=ORDER For list operations, sort issues (default: %s)
// -w --watcher=USER Watcher to add to issue (default: %s)
// or Watcher to search for
}
+226
View File
@@ -0,0 +1,226 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// ChangeHistory defined from schema:
// {
// "title": "Change History",
// "type": "object",
// "properties": {
// "author": {
// "title": "User",
// "type": "object",
// "properties": {
// "active": {
// "title": "active",
// "type": "boolean"
// },
// "avatarUrls": {
// "title": "avatarUrls",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "displayName": {
// "title": "displayName",
// "type": "string"
// },
// "emailAddress": {
// "title": "emailAddress",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "timeZone": {
// "title": "timeZone",
// "type": "string"
// }
// }
// },
// "created": {
// "title": "created",
// "type": "string"
// },
// "historyMetadata": {
// "title": "History Metadata",
// "type": "object",
// "properties": {
// "activityDescription": {
// "title": "activityDescription",
// "type": "string"
// },
// "activityDescriptionKey": {
// "title": "activityDescriptionKey",
// "type": "string"
// },
// "actor": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "cause": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "description": {
// "title": "description",
// "type": "string"
// },
// "descriptionKey": {
// "title": "descriptionKey",
// "type": "string"
// },
// "emailDescription": {
// "title": "emailDescription",
// "type": "string"
// },
// "emailDescriptionKey": {
// "title": "emailDescriptionKey",
// "type": "string"
// },
// "extraData": {
// "title": "extraData",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "generator": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "items": {
// "title": "items",
// "type": "array",
// "items": {
// "title": "Change Item",
// "type": "object",
// "properties": {
// "field": {
// "title": "field",
// "type": "string"
// },
// "fieldtype": {
// "title": "fieldtype",
// "type": "string"
// },
// "from": {
// "title": "from",
// "type": "string"
// },
// "fromString": {
// "title": "fromString",
// "type": "string"
// },
// "to": {
// "title": "to",
// "type": "string"
// },
// "toString": {
// "title": "toString",
// "type": "string"
// }
// }
// }
// }
// }
// }
type ChangeHistory struct {
Author *User `json:"author,omitempty" yaml:"author,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
HistoryMetadata *HistoryMetadata `json:"historyMetadata,omitempty" yaml:"historyMetadata,omitempty"`
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Items Items `json:"items,omitempty" yaml:"items,omitempty"`
}
+51
View File
@@ -0,0 +1,51 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// ChangeItem defined from schema:
// {
// "title": "Change Item",
// "type": "object",
// "properties": {
// "field": {
// "title": "field",
// "type": "string"
// },
// "fieldtype": {
// "title": "fieldtype",
// "type": "string"
// },
// "from": {
// "title": "from",
// "type": "string"
// },
// "fromString": {
// "title": "fromString",
// "type": "string"
// },
// "to": {
// "title": "to",
// "type": "string"
// },
// "toString": {
// "title": "toString",
// "type": "string"
// }
// }
// }
type ChangeItem struct {
Field string `json:"field,omitempty" yaml:"field,omitempty"`
Fieldtype string `json:"fieldtype,omitempty" yaml:"fieldtype,omitempty"`
From string `json:"from,omitempty" yaml:"from,omitempty"`
FromString string `json:"fromString,omitempty" yaml:"fromString,omitempty"`
To string `json:"to,omitempty" yaml:"to,omitempty"`
ToString string `json:"toString,omitempty" yaml:"toString,omitempty"`
}
+247
View File
@@ -0,0 +1,247 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// Changelog defined from schema:
// {
// "title": "Changelog",
// "type": "object",
// "properties": {
// "histories": {
// "title": "histories",
// "type": "array",
// "items": {
// "title": "Change History",
// "type": "object",
// "properties": {
// "author": {
// "title": "User",
// "type": "object",
// "properties": {
// "active": {
// "title": "active",
// "type": "boolean"
// },
// "avatarUrls": {
// "title": "avatarUrls",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "displayName": {
// "title": "displayName",
// "type": "string"
// },
// "emailAddress": {
// "title": "emailAddress",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "timeZone": {
// "title": "timeZone",
// "type": "string"
// }
// }
// },
// "created": {
// "title": "created",
// "type": "string"
// },
// "historyMetadata": {
// "title": "History Metadata",
// "type": "object",
// "properties": {
// "activityDescription": {
// "title": "activityDescription",
// "type": "string"
// },
// "activityDescriptionKey": {
// "title": "activityDescriptionKey",
// "type": "string"
// },
// "actor": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "cause": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "description": {
// "title": "description",
// "type": "string"
// },
// "descriptionKey": {
// "title": "descriptionKey",
// "type": "string"
// },
// "emailDescription": {
// "title": "emailDescription",
// "type": "string"
// },
// "emailDescriptionKey": {
// "title": "emailDescriptionKey",
// "type": "string"
// },
// "extraData": {
// "title": "extraData",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "generator": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "items": {
// "title": "items",
// "type": "array",
// "items": {
// "title": "Change Item",
// "type": "object",
// "properties": {
// "field": {
// "title": "field",
// "type": "string"
// },
// "fieldtype": {
// "title": "fieldtype",
// "type": "string"
// },
// "from": {
// "title": "from",
// "type": "string"
// },
// "fromString": {
// "title": "fromString",
// "type": "string"
// },
// "to": {
// "title": "to",
// "type": "string"
// },
// "toString": {
// "title": "toString",
// "type": "string"
// }
// }
// }
// }
// }
// }
// },
// "maxResults": {
// "title": "maxResults",
// "type": "integer"
// },
// "startAt": {
// "title": "startAt",
// "type": "integer"
// },
// "total": {
// "title": "total",
// "type": "integer"
// }
// }
// }
type Changelog struct {
Histories Histories `json:"histories,omitempty" yaml:"histories,omitempty"`
MaxResults int `json:"maxResults,omitempty" yaml:"maxResults,omitempty"`
StartAt int `json:"startAt,omitempty" yaml:"startAt,omitempty"`
Total int `json:"total,omitempty" yaml:"total,omitempty"`
}
+62
View File
@@ -0,0 +1,62 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// EditMeta defined from schema:
// {
// "title": "Edit Meta",
// "type": "object",
// "properties": {
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Field Meta",
// "type": "object",
// "properties": {
// "allowedValues": {
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "type": "string"
// },
// "hasDefaultValue": {
// "type": "boolean"
// },
// "key": {
// "type": "string"
// },
// "name": {
// "type": "string"
// },
// "operations": {
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "type": "boolean"
// },
// "schema": {
// "$ref": "#/definitions/json-type"
// }
// }
// }
// }
// }
// }
// }
type EditMeta struct {
Fields FieldMetaMap `json:"fields,omitempty" yaml:"fields,omitempty"`
}
+5 -35
View File
@@ -5,7 +5,7 @@ package jiradata
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
@@ -16,72 +16,42 @@ package jiradata
// "type": "object",
// "properties": {
// "allowedValues": {
// "title": "allowedValues",
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "title": "autoCompleteUrl",
// "type": "string"
// },
// "hasDefaultValue": {
// "title": "hasDefaultValue",
// "type": "boolean"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "operations": {
// "title": "operations",
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "title": "required",
// "type": "boolean"
// },
// "schema": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "title": "custom",
// "type": "string"
// },
// "customId": {
// "title": "customId",
// "type": "integer"
// },
// "items": {
// "title": "items",
// "type": "string"
// },
// "system": {
// "title": "system",
// "type": "string"
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// "$ref": "#/definitions/json-type"
// }
// }
// }
type FieldMeta struct {
AllowedValues AllowedValues `json:"allowedValues,omitempty" yaml:"allowedValues,omitempty"`
AllowedValues []interface{} `json:"allowedValues,omitempty" yaml:"allowedValues,omitempty"`
AutoCompleteURL string `json:"autoCompleteUrl,omitempty" yaml:"autoCompleteUrl,omitempty"`
HasDefaultValue bool `json:"hasDefaultValue,omitempty" yaml:"hasDefaultValue,omitempty"`
Key string `json:"key,omitempty" yaml:"key,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Operations Operations `json:"operations,omitempty" yaml:"operations,omitempty"`
Operations []string `json:"operations,omitempty" yaml:"operations,omitempty"`
Required bool `json:"required,omitempty" yaml:"required,omitempty"`
Schema *JSONType `json:"schema,omitempty" yaml:"schema,omitempty"`
Schema interface{} `json:"schema,omitempty" yaml:"schema,omitempty"`
}
+2 -32
View File
@@ -5,7 +5,7 @@ package jiradata
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
@@ -20,62 +20,32 @@ package jiradata
// "type": "object",
// "properties": {
// "allowedValues": {
// "title": "allowedValues",
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "title": "autoCompleteUrl",
// "type": "string"
// },
// "hasDefaultValue": {
// "title": "hasDefaultValue",
// "type": "boolean"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "operations": {
// "title": "operations",
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "title": "required",
// "type": "boolean"
// },
// "schema": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "title": "custom",
// "type": "string"
// },
// "customId": {
// "title": "customId",
// "type": "integer"
// },
// "items": {
// "title": "items",
// "type": "string"
// },
// "system": {
// "title": "system",
// "type": "string"
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// "$ref": "#/definitions/json-type"
// }
// }
// }
+21
View File
@@ -0,0 +1,21 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchRequest.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// Fields defined from schema:
// {
// "title": "fields",
// "type": "array",
// "items": {
// "type": "string"
// }
// }
type Fields []string
+224
View File
@@ -0,0 +1,224 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// Histories defined from schema:
// {
// "title": "histories",
// "type": "array",
// "items": {
// "title": "Change History",
// "type": "object",
// "properties": {
// "author": {
// "title": "User",
// "type": "object",
// "properties": {
// "active": {
// "title": "active",
// "type": "boolean"
// },
// "avatarUrls": {
// "title": "avatarUrls",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "displayName": {
// "title": "displayName",
// "type": "string"
// },
// "emailAddress": {
// "title": "emailAddress",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "timeZone": {
// "title": "timeZone",
// "type": "string"
// }
// }
// },
// "created": {
// "title": "created",
// "type": "string"
// },
// "historyMetadata": {
// "title": "History Metadata",
// "type": "object",
// "properties": {
// "activityDescription": {
// "title": "activityDescription",
// "type": "string"
// },
// "activityDescriptionKey": {
// "title": "activityDescriptionKey",
// "type": "string"
// },
// "actor": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "cause": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "description": {
// "title": "description",
// "type": "string"
// },
// "descriptionKey": {
// "title": "descriptionKey",
// "type": "string"
// },
// "emailDescription": {
// "title": "emailDescription",
// "type": "string"
// },
// "emailDescriptionKey": {
// "title": "emailDescriptionKey",
// "type": "string"
// },
// "extraData": {
// "title": "extraData",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "generator": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "items": {
// "title": "items",
// "type": "array",
// "items": {
// "title": "Change Item",
// "type": "object",
// "properties": {
// "field": {
// "title": "field",
// "type": "string"
// },
// "fieldtype": {
// "title": "fieldtype",
// "type": "string"
// },
// "from": {
// "title": "from",
// "type": "string"
// },
// "fromString": {
// "title": "fromString",
// "type": "string"
// },
// "to": {
// "title": "to",
// "type": "string"
// },
// "toString": {
// "title": "toString",
// "type": "string"
// }
// }
// }
// }
// }
// }
// }
type Histories []*ChangeHistory
+141
View File
@@ -0,0 +1,141 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// HistoryMetadata defined from schema:
// {
// "title": "History Metadata",
// "type": "object",
// "properties": {
// "activityDescription": {
// "title": "activityDescription",
// "type": "string"
// },
// "activityDescriptionKey": {
// "title": "activityDescriptionKey",
// "type": "string"
// },
// "actor": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "cause": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "description": {
// "title": "description",
// "type": "string"
// },
// "descriptionKey": {
// "title": "descriptionKey",
// "type": "string"
// },
// "emailDescription": {
// "title": "emailDescription",
// "type": "string"
// },
// "emailDescriptionKey": {
// "title": "emailDescriptionKey",
// "type": "string"
// },
// "extraData": {
// "title": "extraData",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "generator": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// }
type HistoryMetadata struct {
ActivityDescription string `json:"activityDescription,omitempty" yaml:"activityDescription,omitempty"`
ActivityDescriptionKey string `json:"activityDescriptionKey,omitempty" yaml:"activityDescriptionKey,omitempty"`
Actor *HistoryMetadataParticipant `json:"actor,omitempty" yaml:"actor,omitempty"`
Cause *HistoryMetadataParticipant `json:"cause,omitempty" yaml:"cause,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
DescriptionKey string `json:"descriptionKey,omitempty" yaml:"descriptionKey,omitempty"`
EmailDescription string `json:"emailDescription,omitempty" yaml:"emailDescription,omitempty"`
EmailDescriptionKey string `json:"emailDescriptionKey,omitempty" yaml:"emailDescriptionKey,omitempty"`
ExtraData map[string]string `json:"extraData,omitempty" yaml:"extraData,omitempty"`
Generator *HistoryMetadataParticipant `json:"generator,omitempty" yaml:"generator,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
}
+45
View File
@@ -0,0 +1,45 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// HistoryMetadataParticipant defined from schema:
// {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// }
type HistoryMetadataParticipant struct {
AvatarURL string `json:"avatarUrl,omitempty" yaml:"avatarUrl,omitempty"`
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
DisplayNameKey string `json:"displayNameKey,omitempty" yaml:"displayNameKey,omitempty"`
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
URL string `json:"url,omitempty" yaml:"url,omitempty"`
}
+18
View File
@@ -0,0 +1,18 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// IncludedFields defined from schema:
// {
// "title": "Included Fields",
// "type": "object"
// }
type IncludedFields map[string]string
+569
View File
@@ -0,0 +1,569 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// Issue defined from schema:
// {
// "title": "Issue",
// "type": "object",
// "properties": {
// "changelog": {
// "title": "Changelog",
// "type": "object",
// "properties": {
// "histories": {
// "title": "histories",
// "type": "array",
// "items": {
// "title": "Change History",
// "type": "object",
// "properties": {
// "author": {
// "title": "User",
// "type": "object",
// "properties": {
// "active": {
// "title": "active",
// "type": "boolean"
// },
// "avatarUrls": {
// "title": "avatarUrls",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "displayName": {
// "title": "displayName",
// "type": "string"
// },
// "emailAddress": {
// "title": "emailAddress",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "timeZone": {
// "title": "timeZone",
// "type": "string"
// }
// }
// },
// "created": {
// "title": "created",
// "type": "string"
// },
// "historyMetadata": {
// "title": "History Metadata",
// "type": "object",
// "properties": {
// "activityDescription": {
// "title": "activityDescription",
// "type": "string"
// },
// "activityDescriptionKey": {
// "title": "activityDescriptionKey",
// "type": "string"
// },
// "actor": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "cause": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "description": {
// "title": "description",
// "type": "string"
// },
// "descriptionKey": {
// "title": "descriptionKey",
// "type": "string"
// },
// "emailDescription": {
// "title": "emailDescription",
// "type": "string"
// },
// "emailDescriptionKey": {
// "title": "emailDescriptionKey",
// "type": "string"
// },
// "extraData": {
// "title": "extraData",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "generator": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "items": {
// "title": "items",
// "type": "array",
// "items": {
// "title": "Change Item",
// "type": "object",
// "properties": {
// "field": {
// "title": "field",
// "type": "string"
// },
// "fieldtype": {
// "title": "fieldtype",
// "type": "string"
// },
// "from": {
// "title": "from",
// "type": "string"
// },
// "fromString": {
// "title": "fromString",
// "type": "string"
// },
// "to": {
// "title": "to",
// "type": "string"
// },
// "toString": {
// "title": "toString",
// "type": "string"
// }
// }
// }
// }
// }
// }
// },
// "maxResults": {
// "title": "maxResults",
// "type": "integer"
// },
// "startAt": {
// "title": "startAt",
// "type": "integer"
// },
// "total": {
// "title": "total",
// "type": "integer"
// }
// }
// },
// "editmeta": {
// "title": "Edit Meta",
// "type": "object",
// "properties": {
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Field Meta",
// "type": "object",
// "properties": {
// "allowedValues": {
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "type": "string"
// },
// "hasDefaultValue": {
// "type": "boolean"
// },
// "key": {
// "type": "string"
// },
// "name": {
// "type": "string"
// },
// "operations": {
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "type": "boolean"
// },
// "schema": {
// "$ref": "#/definitions/json-type"
// }
// }
// }
// }
// }
// }
// },
// "expand": {
// "title": "expand",
// "type": "string"
// },
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// },
// "fieldsToInclude": {
// "title": "Included Fields",
// "type": "object"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "names": {
// "title": "names",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "operations": {
// "title": "Opsbar",
// "type": "object",
// "properties": {
// "linkGroups": {
// "title": "linkGroups",
// "type": "array",
// "items": {
// "title": "Link Group",
// "type": "object",
// "properties": {
// "groups": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/link-group"
// }
// },
// "header": {
// "$ref": "#/definitions/simple-link"
// },
// "id": {
// "type": "string"
// },
// "links": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/simple-link"
// }
// },
// "styleClass": {
// "type": "string"
// },
// "weight": {
// "type": "integer"
// }
// }
// }
// }
// }
// },
// "properties": {
// "title": "Properties",
// "type": "object",
// "properties": {
// "properties": {
// "title": "properties",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// }
// }
// },
// "renderedFields": {
// "title": "renderedFields",
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// },
// "schema": {
// "title": "schema",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "type": "string"
// },
// "customId": {
// "type": "integer"
// },
// "items": {
// "type": "string"
// },
// "system": {
// "type": "string"
// },
// "type": {
// "type": "string"
// }
// }
// }
// }
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "transitions": {
// "title": "transitions",
// "type": "array",
// "items": {
// "title": "Transition",
// "type": "object",
// "properties": {
// "expand": {
// "title": "expand",
// "type": "string"
// },
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Field Meta",
// "type": "object",
// "properties": {
// "allowedValues": {
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "type": "string"
// },
// "hasDefaultValue": {
// "type": "boolean"
// },
// "key": {
// "type": "string"
// },
// "name": {
// "type": "string"
// },
// "operations": {
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "type": "boolean"
// },
// "schema": {
// "$ref": "#/definitions/json-type"
// }
// }
// }
// }
// },
// "hasScreen": {
// "title": "hasScreen",
// "type": "boolean"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "to": {
// "title": "Status",
// "type": "object",
// "properties": {
// "description": {
// "title": "description",
// "type": "string"
// },
// "iconUrl": {
// "title": "iconUrl",
// "type": "string"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "statusCategory": {
// "title": "Status Category",
// "type": "object",
// "properties": {
// "colorName": {
// "title": "colorName",
// "type": "string"
// },
// "id": {
// "title": "id",
// "type": "integer"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// }
// }
// },
// "statusColor": {
// "title": "statusColor",
// "type": "string"
// }
// }
// }
// }
// }
// },
// "versionedRepresentations": {
// "title": "versionedRepresentations",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// }
// }
// }
// }
// }
type Issue struct {
Changelog *Changelog `json:"changelog,omitempty" yaml:"changelog,omitempty"`
Editmeta *EditMeta `json:"editmeta,omitempty" yaml:"editmeta,omitempty"`
Expand string `json:"expand,omitempty" yaml:"expand,omitempty"`
Fields map[string]interface{} `json:"fields,omitempty" yaml:"fields,omitempty"`
FieldsToInclude IncludedFields `json:"fieldsToInclude,omitempty" yaml:"fieldsToInclude,omitempty"`
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Key string `json:"key,omitempty" yaml:"key,omitempty"`
Names map[string]string `json:"names,omitempty" yaml:"names,omitempty"`
Operations *Opsbar `json:"operations,omitempty" yaml:"operations,omitempty"`
Properties *Properties `json:"properties,omitempty" yaml:"properties,omitempty"`
RenderedFields map[string]interface{} `json:"renderedFields,omitempty" yaml:"renderedFields,omitempty"`
Schema JSONTypeMap `json:"schema,omitempty" yaml:"schema,omitempty"`
Self string `json:"self,omitempty" yaml:"self,omitempty"`
Transitions Transitions `json:"transitions,omitempty" yaml:"transitions,omitempty"`
VersionedRepresentations map[string]map[string]interface{} `json:"versionedRepresentations,omitempty" yaml:"versionedRepresentations,omitempty"`
}
+557
View File
@@ -0,0 +1,557 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// Issues defined from schema:
// {
// "title": "issues",
// "type": "array",
// "items": {
// "title": "Issue",
// "type": "object",
// "properties": {
// "changelog": {
// "title": "Changelog",
// "type": "object",
// "properties": {
// "histories": {
// "title": "histories",
// "type": "array",
// "items": {
// "title": "Change History",
// "type": "object",
// "properties": {
// "author": {
// "title": "User",
// "type": "object",
// "properties": {
// "active": {
// "title": "active",
// "type": "boolean"
// },
// "avatarUrls": {
// "title": "avatarUrls",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "displayName": {
// "title": "displayName",
// "type": "string"
// },
// "emailAddress": {
// "title": "emailAddress",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "timeZone": {
// "title": "timeZone",
// "type": "string"
// }
// }
// },
// "created": {
// "title": "created",
// "type": "string"
// },
// "historyMetadata": {
// "title": "History Metadata",
// "type": "object",
// "properties": {
// "activityDescription": {
// "title": "activityDescription",
// "type": "string"
// },
// "activityDescriptionKey": {
// "title": "activityDescriptionKey",
// "type": "string"
// },
// "actor": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "cause": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "description": {
// "title": "description",
// "type": "string"
// },
// "descriptionKey": {
// "title": "descriptionKey",
// "type": "string"
// },
// "emailDescription": {
// "title": "emailDescription",
// "type": "string"
// },
// "emailDescriptionKey": {
// "title": "emailDescriptionKey",
// "type": "string"
// },
// "extraData": {
// "title": "extraData",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "generator": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "items": {
// "title": "items",
// "type": "array",
// "items": {
// "title": "Change Item",
// "type": "object",
// "properties": {
// "field": {
// "title": "field",
// "type": "string"
// },
// "fieldtype": {
// "title": "fieldtype",
// "type": "string"
// },
// "from": {
// "title": "from",
// "type": "string"
// },
// "fromString": {
// "title": "fromString",
// "type": "string"
// },
// "to": {
// "title": "to",
// "type": "string"
// },
// "toString": {
// "title": "toString",
// "type": "string"
// }
// }
// }
// }
// }
// }
// },
// "maxResults": {
// "title": "maxResults",
// "type": "integer"
// },
// "startAt": {
// "title": "startAt",
// "type": "integer"
// },
// "total": {
// "title": "total",
// "type": "integer"
// }
// }
// },
// "editmeta": {
// "title": "Edit Meta",
// "type": "object",
// "properties": {
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Field Meta",
// "type": "object",
// "properties": {
// "allowedValues": {
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "type": "string"
// },
// "hasDefaultValue": {
// "type": "boolean"
// },
// "key": {
// "type": "string"
// },
// "name": {
// "type": "string"
// },
// "operations": {
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "type": "boolean"
// },
// "schema": {
// "$ref": "#/definitions/json-type"
// }
// }
// }
// }
// }
// }
// },
// "expand": {
// "title": "expand",
// "type": "string"
// },
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// },
// "fieldsToInclude": {
// "title": "Included Fields",
// "type": "object"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "names": {
// "title": "names",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "operations": {
// "title": "Opsbar",
// "type": "object",
// "properties": {
// "linkGroups": {
// "title": "linkGroups",
// "type": "array",
// "items": {
// "title": "Link Group",
// "type": "object",
// "properties": {
// "groups": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/link-group"
// }
// },
// "header": {
// "$ref": "#/definitions/simple-link"
// },
// "id": {
// "type": "string"
// },
// "links": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/simple-link"
// }
// },
// "styleClass": {
// "type": "string"
// },
// "weight": {
// "type": "integer"
// }
// }
// }
// }
// }
// },
// "properties": {
// "title": "Properties",
// "type": "object",
// "properties": {
// "properties": {
// "title": "properties",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// }
// }
// },
// "renderedFields": {
// "title": "renderedFields",
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// },
// "schema": {
// "title": "schema",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "type": "string"
// },
// "customId": {
// "type": "integer"
// },
// "items": {
// "type": "string"
// },
// "system": {
// "type": "string"
// },
// "type": {
// "type": "string"
// }
// }
// }
// }
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "transitions": {
// "title": "transitions",
// "type": "array",
// "items": {
// "title": "Transition",
// "type": "object",
// "properties": {
// "expand": {
// "title": "expand",
// "type": "string"
// },
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Field Meta",
// "type": "object",
// "properties": {
// "allowedValues": {
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "type": "string"
// },
// "hasDefaultValue": {
// "type": "boolean"
// },
// "key": {
// "type": "string"
// },
// "name": {
// "type": "string"
// },
// "operations": {
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "type": "boolean"
// },
// "schema": {
// "$ref": "#/definitions/json-type"
// }
// }
// }
// }
// },
// "hasScreen": {
// "title": "hasScreen",
// "type": "boolean"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "to": {
// "title": "Status",
// "type": "object",
// "properties": {
// "description": {
// "title": "description",
// "type": "string"
// },
// "iconUrl": {
// "title": "iconUrl",
// "type": "string"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "statusCategory": {
// "title": "Status Category",
// "type": "object",
// "properties": {
// "colorName": {
// "title": "colorName",
// "type": "string"
// },
// "id": {
// "title": "id",
// "type": "integer"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// }
// }
// },
// "statusColor": {
// "title": "statusColor",
// "type": "string"
// }
// }
// }
// }
// }
// },
// "versionedRepresentations": {
// "title": "versionedRepresentations",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// }
// }
// }
// }
// }
// }
type Issues []*Issue
+48
View File
@@ -0,0 +1,48 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// Items defined from schema:
// {
// "title": "items",
// "type": "array",
// "items": {
// "title": "Change Item",
// "type": "object",
// "properties": {
// "field": {
// "title": "field",
// "type": "string"
// },
// "fieldtype": {
// "title": "fieldtype",
// "type": "string"
// },
// "from": {
// "title": "from",
// "type": "string"
// },
// "fromString": {
// "title": "fromString",
// "type": "string"
// },
// "to": {
// "title": "to",
// "type": "string"
// },
// "toString": {
// "title": "toString",
// "type": "string"
// }
// }
// }
// }
type Items []*ChangeItem
+41
View File
@@ -0,0 +1,41 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// JSONTypeMap defined from schema:
// {
// "title": "schema",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "type": "string"
// },
// "customId": {
// "type": "integer"
// },
// "items": {
// "type": "string"
// },
// "system": {
// "type": "string"
// },
// "type": {
// "type": "string"
// }
// }
// }
// }
// }
type JSONTypeMap map[string]*JSONType
+1 -6
View File
@@ -5,7 +5,7 @@ package jiradata
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
@@ -16,23 +16,18 @@ package jiradata
// "type": "object",
// "properties": {
// "custom": {
// "title": "custom",
// "type": "string"
// },
// "customId": {
// "title": "customId",
// "type": "integer"
// },
// "items": {
// "title": "items",
// "type": "string"
// },
// "system": {
// "title": "system",
// "type": "string"
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
+51
View File
@@ -0,0 +1,51 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// LinkGroup defined from schema:
// {
// "title": "Link Group",
// "type": "object",
// "properties": {
// "groups": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/link-group"
// }
// },
// "header": {
// "$ref": "#/definitions/simple-link"
// },
// "id": {
// "type": "string"
// },
// "links": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/simple-link"
// }
// },
// "styleClass": {
// "type": "string"
// },
// "weight": {
// "type": "integer"
// }
// }
// }
type LinkGroup struct {
Groups []interface{} `json:"groups,omitempty" yaml:"groups,omitempty"`
Header interface{} `json:"header,omitempty" yaml:"header,omitempty"`
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Links []interface{} `json:"links,omitempty" yaml:"links,omitempty"`
StyleClass string `json:"styleClass,omitempty" yaml:"styleClass,omitempty"`
Weight int `json:"weight,omitempty" yaml:"weight,omitempty"`
}
+48
View File
@@ -0,0 +1,48 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// LinkGroups defined from schema:
// {
// "title": "linkGroups",
// "type": "array",
// "items": {
// "title": "Link Group",
// "type": "object",
// "properties": {
// "groups": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/link-group"
// }
// },
// "header": {
// "$ref": "#/definitions/simple-link"
// },
// "id": {
// "type": "string"
// },
// "links": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/simple-link"
// }
// },
// "styleClass": {
// "type": "string"
// },
// "weight": {
// "type": "integer"
// }
// }
// }
// }
type LinkGroups []*LinkGroup
+56
View File
@@ -0,0 +1,56 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// Opsbar defined from schema:
// {
// "title": "Opsbar",
// "type": "object",
// "properties": {
// "linkGroups": {
// "title": "linkGroups",
// "type": "array",
// "items": {
// "title": "Link Group",
// "type": "object",
// "properties": {
// "groups": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/link-group"
// }
// },
// "header": {
// "$ref": "#/definitions/simple-link"
// },
// "id": {
// "type": "string"
// },
// "links": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/simple-link"
// }
// },
// "styleClass": {
// "type": "string"
// },
// "weight": {
// "type": "integer"
// }
// }
// }
// }
// }
// }
type Opsbar struct {
LinkGroups LinkGroups `json:"linkGroups,omitempty" yaml:"linkGroups,omitempty"`
}
+31
View File
@@ -0,0 +1,31 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// Properties defined from schema:
// {
// "title": "Properties",
// "type": "object",
// "properties": {
// "properties": {
// "title": "properties",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// }
// }
// }
type Properties struct {
Properties map[string]string `json:"properties,omitempty" yaml:"properties,omitempty"`
}
+55
View File
@@ -0,0 +1,55 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchRequest.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// SearchRequest defined from schema:
// {
// "title": "Search Request",
// "id": "https://docs.atlassian.com/jira/REST/schema/search-request#",
// "type": "object",
// "properties": {
// "fields": {
// "title": "fields",
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "fieldsByKeys": {
// "title": "fieldsByKeys",
// "type": "boolean"
// },
// "jql": {
// "title": "jql",
// "type": "string"
// },
// "maxResults": {
// "title": "maxResults",
// "type": "integer"
// },
// "startAt": {
// "title": "startAt",
// "type": "integer"
// },
// "validateQuery": {
// "title": "validateQuery",
// "type": "boolean"
// }
// }
// }
type SearchRequest struct {
Fields Fields `json:"fields,omitempty" yaml:"fields,omitempty"`
FieldsByKeys bool `json:"fieldsByKeys,omitempty" yaml:"fieldsByKeys,omitempty"`
JQL string `json:"jql,omitempty" yaml:"jql,omitempty"`
MaxResults int `json:"maxResults,omitempty" yaml:"maxResults,omitempty"`
StartAt int `json:"startAt,omitempty" yaml:"startAt,omitempty"`
ValidateQuery bool `json:"validateQuery,omitempty" yaml:"validateQuery,omitempty"`
}
+770
View File
@@ -0,0 +1,770 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// SearchResults defined from schema:
// {
// "title": "Search Results",
// "id": "https://docs.atlassian.com/jira/REST/schema/search-results#",
// "type": "object",
// "definitions": {
// "field-meta": {
// "title": "Field Meta",
// "type": "object",
// "properties": {
// "allowedValues": {
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "type": "string"
// },
// "hasDefaultValue": {
// "type": "boolean"
// },
// "key": {
// "type": "string"
// },
// "name": {
// "type": "string"
// },
// "operations": {
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "type": "boolean"
// },
// "schema": {
// "$ref": "#/definitions/json-type"
// }
// }
// },
// "history-metadata-participant": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "json-type": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "type": "string"
// },
// "customId": {
// "type": "integer"
// },
// "items": {
// "type": "string"
// },
// "system": {
// "type": "string"
// },
// "type": {
// "type": "string"
// }
// }
// },
// "link-group": {
// "title": "Link Group",
// "type": "object",
// "properties": {
// "groups": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/link-group"
// }
// },
// "header": {
// "$ref": "#/definitions/simple-link"
// },
// "id": {
// "type": "string"
// },
// "links": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/simple-link"
// }
// },
// "styleClass": {
// "type": "string"
// },
// "weight": {
// "type": "integer"
// }
// }
// },
// "simple-link": {
// "title": "Simple Link",
// "type": "object",
// "properties": {
// "href": {
// "type": "string"
// },
// "iconClass": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "label": {
// "type": "string"
// },
// "styleClass": {
// "type": "string"
// },
// "title": {
// "type": "string"
// },
// "weight": {
// "type": "integer"
// }
// }
// }
// },
// "properties": {
// "expand": {
// "title": "expand",
// "type": "string"
// },
// "issues": {
// "title": "issues",
// "type": "array",
// "items": {
// "title": "Issue",
// "type": "object",
// "properties": {
// "changelog": {
// "title": "Changelog",
// "type": "object",
// "properties": {
// "histories": {
// "title": "histories",
// "type": "array",
// "items": {
// "title": "Change History",
// "type": "object",
// "properties": {
// "author": {
// "title": "User",
// "type": "object",
// "properties": {
// "active": {
// "title": "active",
// "type": "boolean"
// },
// "avatarUrls": {
// "title": "avatarUrls",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "displayName": {
// "title": "displayName",
// "type": "string"
// },
// "emailAddress": {
// "title": "emailAddress",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "timeZone": {
// "title": "timeZone",
// "type": "string"
// }
// }
// },
// "created": {
// "title": "created",
// "type": "string"
// },
// "historyMetadata": {
// "title": "History Metadata",
// "type": "object",
// "properties": {
// "activityDescription": {
// "title": "activityDescription",
// "type": "string"
// },
// "activityDescriptionKey": {
// "title": "activityDescriptionKey",
// "type": "string"
// },
// "actor": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "cause": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "description": {
// "title": "description",
// "type": "string"
// },
// "descriptionKey": {
// "title": "descriptionKey",
// "type": "string"
// },
// "emailDescription": {
// "title": "emailDescription",
// "type": "string"
// },
// "emailDescriptionKey": {
// "title": "emailDescriptionKey",
// "type": "string"
// },
// "extraData": {
// "title": "extraData",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "generator": {
// "title": "History Metadata Participant",
// "type": "object",
// "properties": {
// "avatarUrl": {
// "type": "string"
// },
// "displayName": {
// "type": "string"
// },
// "displayNameKey": {
// "type": "string"
// },
// "id": {
// "type": "string"
// },
// "type": {
// "type": "string"
// },
// "url": {
// "type": "string"
// }
// }
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "items": {
// "title": "items",
// "type": "array",
// "items": {
// "title": "Change Item",
// "type": "object",
// "properties": {
// "field": {
// "title": "field",
// "type": "string"
// },
// "fieldtype": {
// "title": "fieldtype",
// "type": "string"
// },
// "from": {
// "title": "from",
// "type": "string"
// },
// "fromString": {
// "title": "fromString",
// "type": "string"
// },
// "to": {
// "title": "to",
// "type": "string"
// },
// "toString": {
// "title": "toString",
// "type": "string"
// }
// }
// }
// }
// }
// }
// },
// "maxResults": {
// "title": "maxResults",
// "type": "integer"
// },
// "startAt": {
// "title": "startAt",
// "type": "integer"
// },
// "total": {
// "title": "total",
// "type": "integer"
// }
// }
// },
// "editmeta": {
// "title": "Edit Meta",
// "type": "object",
// "properties": {
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Field Meta",
// "type": "object",
// "properties": {
// "allowedValues": {
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "type": "string"
// },
// "hasDefaultValue": {
// "type": "boolean"
// },
// "key": {
// "type": "string"
// },
// "name": {
// "type": "string"
// },
// "operations": {
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "type": "boolean"
// },
// "schema": {
// "$ref": "#/definitions/json-type"
// }
// }
// }
// }
// }
// }
// },
// "expand": {
// "title": "expand",
// "type": "string"
// },
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// },
// "fieldsToInclude": {
// "title": "Included Fields",
// "type": "object"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "names": {
// "title": "names",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "operations": {
// "title": "Opsbar",
// "type": "object",
// "properties": {
// "linkGroups": {
// "title": "linkGroups",
// "type": "array",
// "items": {
// "title": "Link Group",
// "type": "object",
// "properties": {
// "groups": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/link-group"
// }
// },
// "header": {
// "$ref": "#/definitions/simple-link"
// },
// "id": {
// "type": "string"
// },
// "links": {
// "type": "array",
// "items": {
// "$ref": "#/definitions/simple-link"
// }
// },
// "styleClass": {
// "type": "string"
// },
// "weight": {
// "type": "integer"
// }
// }
// }
// }
// }
// },
// "properties": {
// "title": "Properties",
// "type": "object",
// "properties": {
// "properties": {
// "title": "properties",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// }
// }
// },
// "renderedFields": {
// "title": "renderedFields",
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// },
// "schema": {
// "title": "schema",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "type": "string"
// },
// "customId": {
// "type": "integer"
// },
// "items": {
// "type": "string"
// },
// "system": {
// "type": "string"
// },
// "type": {
// "type": "string"
// }
// }
// }
// }
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "transitions": {
// "title": "transitions",
// "type": "array",
// "items": {
// "title": "Transition",
// "type": "object",
// "properties": {
// "expand": {
// "title": "expand",
// "type": "string"
// },
// "fields": {
// "title": "fields",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Field Meta",
// "type": "object",
// "properties": {
// "allowedValues": {
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "type": "string"
// },
// "hasDefaultValue": {
// "type": "boolean"
// },
// "key": {
// "type": "string"
// },
// "name": {
// "type": "string"
// },
// "operations": {
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "type": "boolean"
// },
// "schema": {
// "$ref": "#/definitions/json-type"
// }
// }
// }
// }
// },
// "hasScreen": {
// "title": "hasScreen",
// "type": "boolean"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "to": {
// "title": "Status",
// "type": "object",
// "properties": {
// "description": {
// "title": "description",
// "type": "string"
// },
// "iconUrl": {
// "title": "iconUrl",
// "type": "string"
// },
// "id": {
// "title": "id",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "statusCategory": {
// "title": "Status Category",
// "type": "object",
// "properties": {
// "colorName": {
// "title": "colorName",
// "type": "string"
// },
// "id": {
// "title": "id",
// "type": "integer"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// }
// }
// },
// "statusColor": {
// "title": "statusColor",
// "type": "string"
// }
// }
// }
// }
// }
// },
// "versionedRepresentations": {
// "title": "versionedRepresentations",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "object",
// "patternProperties": {
// ".+": {}
// }
// }
// }
// }
// }
// }
// },
// "maxResults": {
// "title": "maxResults",
// "type": "integer"
// },
// "names": {
// "title": "names",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "schema": {
// "title": "schema",
// "type": "object",
// "patternProperties": {
// ".+": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "type": "string"
// },
// "customId": {
// "type": "integer"
// },
// "items": {
// "type": "string"
// },
// "system": {
// "type": "string"
// },
// "type": {
// "type": "string"
// }
// }
// }
// }
// },
// "startAt": {
// "title": "startAt",
// "type": "integer"
// },
// "total": {
// "title": "total",
// "type": "integer"
// },
// "warningMessages": {
// "title": "warningMessages",
// "type": "array",
// "items": {
// "type": "string"
// }
// }
// }
// }
type SearchResults struct {
Expand string `json:"expand,omitempty" yaml:"expand,omitempty"`
Issues Issues `json:"issues,omitempty" yaml:"issues,omitempty"`
MaxResults int `json:"maxResults,omitempty" yaml:"maxResults,omitempty"`
Names map[string]string `json:"names,omitempty" yaml:"names,omitempty"`
Schema JSONTypeMap `json:"schema,omitempty" yaml:"schema,omitempty"`
StartAt int `json:"startAt,omitempty" yaml:"startAt,omitempty"`
Total int `json:"total,omitempty" yaml:"total,omitempty"`
WarningMessages WarningMessages `json:"warningMessages,omitempty" yaml:"warningMessages,omitempty"`
}
+1 -1
View File
@@ -5,7 +5,7 @@ package jiradata
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -5,7 +5,7 @@ package jiradata
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
+2 -32
View File
@@ -5,7 +5,7 @@ package jiradata
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
@@ -28,62 +28,32 @@ package jiradata
// "type": "object",
// "properties": {
// "allowedValues": {
// "title": "allowedValues",
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "title": "autoCompleteUrl",
// "type": "string"
// },
// "hasDefaultValue": {
// "title": "hasDefaultValue",
// "type": "boolean"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "operations": {
// "title": "operations",
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "title": "required",
// "type": "boolean"
// },
// "schema": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "title": "custom",
// "type": "string"
// },
// "customId": {
// "title": "customId",
// "type": "integer"
// },
// "items": {
// "title": "items",
// "type": "string"
// },
// "system": {
// "title": "system",
// "type": "string"
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// "$ref": "#/definitions/json-type"
// }
// }
// }
+2 -32
View File
@@ -5,7 +5,7 @@ package jiradata
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/TransitionsMeta.json
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
@@ -31,62 +31,32 @@ package jiradata
// "type": "object",
// "properties": {
// "allowedValues": {
// "title": "allowedValues",
// "type": "array",
// "items": {}
// },
// "autoCompleteUrl": {
// "title": "autoCompleteUrl",
// "type": "string"
// },
// "hasDefaultValue": {
// "title": "hasDefaultValue",
// "type": "boolean"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "operations": {
// "title": "operations",
// "type": "array",
// "items": {
// "type": "string"
// }
// },
// "required": {
// "title": "required",
// "type": "boolean"
// },
// "schema": {
// "title": "Json Type",
// "type": "object",
// "properties": {
// "custom": {
// "title": "custom",
// "type": "string"
// },
// "customId": {
// "title": "customId",
// "type": "integer"
// },
// "items": {
// "title": "items",
// "type": "string"
// },
// "system": {
// "title": "system",
// "type": "string"
// },
// "type": {
// "title": "type",
// "type": "string"
// }
// }
// "$ref": "#/definitions/json-type"
// }
// }
// }
+66
View File
@@ -0,0 +1,66 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// User defined from schema:
// {
// "title": "User",
// "type": "object",
// "properties": {
// "active": {
// "title": "active",
// "type": "boolean"
// },
// "avatarUrls": {
// "title": "avatarUrls",
// "type": "object",
// "patternProperties": {
// ".+": {
// "type": "string"
// }
// }
// },
// "displayName": {
// "title": "displayName",
// "type": "string"
// },
// "emailAddress": {
// "title": "emailAddress",
// "type": "string"
// },
// "key": {
// "title": "key",
// "type": "string"
// },
// "name": {
// "title": "name",
// "type": "string"
// },
// "self": {
// "title": "self",
// "type": "string"
// },
// "timeZone": {
// "title": "timeZone",
// "type": "string"
// }
// }
// }
type User struct {
Active bool `json:"active,omitempty" yaml:"active,omitempty"`
AvatarUrls map[string]string `json:"avatarUrls,omitempty" yaml:"avatarUrls,omitempty"`
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
EmailAddress string `json:"emailAddress,omitempty" yaml:"emailAddress,omitempty"`
Key string `json:"key,omitempty" yaml:"key,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Self string `json:"self,omitempty" yaml:"self,omitempty"`
TimeZone string `json:"timeZone,omitempty" yaml:"timeZone,omitempty"`
}
+21
View File
@@ -0,0 +1,21 @@
package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -pkg jiradata -overwrite ../schemas/SearchResults.json
/////////////////////////////////////////////////////////////////////////
// DO NOT EDIT //
/////////////////////////////////////////////////////////////////////////
// WarningMessages defined from schema:
// {
// "title": "warningMessages",
// "type": "array",
// "items": {
// "type": "string"
// }
// }
type WarningMessages []string
Generated
+50 -3
View File
@@ -1,24 +1,71 @@
hash: a55cf7bdfb7f3de5ec4ae965d19857e8bdba595a3bcd4b02e5be0efe8223f7c5
updated: 2016-09-18T00:35:57.456978105-07:00
hash: c912ef7d849008c13494df9deb6ae3f55b7b7472704ea15253bea32d2f8a219a
updated: 2016-09-25T12:49:13.264637268-07:00
imports:
- name: github.com/alecthomas/template
version: a0175ee3bccc567396460bf5acd36800cb10c49c
subpackages:
- parse
- name: github.com/alecthomas/units
version: 2efee857e7cfd4f3d0138cc3cbb1b4966962b93a
- name: github.com/coryb/optigo
version: 1b53172e5b4a00b528ea9fde88a4b76b596e293e
- name: github.com/howeyc/gopass
version: 3ca23474a7c7203e0a0a070fd33508f6efdb9b3d
- name: github.com/kballard/go-shellquote
version: d8ec1a69a250a17bb0e419c386eac1f3711dc142
- name: github.com/mattn/go-colorable
version: ed8eb9e318d7a84ce5915b495b7d35e0cfe7b5a8
- name: github.com/mattn/go-isatty
version: 3a115632dcd687f9c8cd01679c83a06a0e21c1f3
- name: github.com/mgutz/ansi
version: c286dcecd19ff979eeb73ea444e479b903f2cfcb
- name: github.com/op/go-logging
version: 970db520ece77730c7e4724c61121037378659d9
- name: golang.org/x/crypto
version: b13fc1fd382d01861b16b2e6474487d3d4d27f20
subpackages:
- acme
- blowfish
- cast5
- curve25519
- ed25519
- ed25519/internal/edwards25519
- hkdf
- nacl/secretbox
- openpgp
- openpgp/armor
- openpgp/elgamal
- openpgp/errors
- openpgp/packet
- openpgp/s2k
- pbkdf2
- pkcs12/internal/rc2
- poly1305
- ripemd160
- salsa20/salsa
- ssh
- ssh/agent
- ssh/terminal
- ssh/testdata
- name: golang.org/x/net
version: 6250b412798208e6c90b03b7c4f226de5aa299e2
subpackages:
- context
- context/ctxhttp
- name: golang.org/x/sys
version: a646d33e2ee3172a661fc09bca23bb4889a41bc8
subpackages:
- unix
- name: golang.org/x/tools
version: c2ef61f450233d3c629ade8eb2083e43fa75c97a
subpackages:
- cmd/gorename
- name: gopkg.in/alecthomas/kingpin.v2
version: e9044be3ab2a8e11d4e1f418d12f0790d57e8d70
- name: gopkg.in/coryb/yaml.v2
version: bd17d4d1209d8af092496a57db259d2d472676eb
- name: gopkg.in/op/go-logging.v1
version: b2cb9fa56473e98db8caba80237377e83fe44db5
testImports: []
testImports:
- name: gopkg.in/check.v1
version: 4f90aeace3a26ad7021961c297b22c42160c7b25
+5
View File
@@ -8,3 +8,8 @@ import:
- package: gopkg.in/coryb/yaml.v2
- package: gopkg.in/op/go-logging.v1
version: ^1.0.0
- package: gopkg.in/alecthomas/kingpin.v2
version: ^2.2.3
- package: golang.org/x/tools
subpackages:
- cmd/gorename
+23 -58
View File
@@ -8,6 +8,7 @@ import (
"github.com/kballard/go-shellquote"
"gopkg.in/coryb/yaml.v2"
"gopkg.in/op/go-logging.v1"
"gopkg.in/Netflix-Skunkworks/go-jira.v1/data"
"io/ioutil"
"net/http"
"net/http/cookiejar"
@@ -465,75 +466,39 @@ func (c *Cli) ViewIssue(issue string) (interface{}, error) {
return data, nil
}
type QueryOptions struct {
Assignee string
}
// FindIssues will return a list of issues that match the given options.
// If the "query" option is undefined it will generate a JQL query
// using any/all of the provide options: project, component, assignee,
// issuetype, watcher, reporter, sort
// Further it will restrict the fields being extracted from the jira
// response with the 'queryfields' option
func (c *Cli) FindIssues() (interface{}, error) {
var query string
var ok bool
// project = BAKERY and status not in (Resolved, Closed)
if query, ok = c.opts["query"].(string); !ok {
qbuff := bytes.NewBufferString("resolution = unresolved")
var project string
if project, ok = c.opts["project"].(string); !ok {
err := fmt.Errorf("Missing required arguments, either 'query' or 'project' are required")
log.Errorf("%s", err)
return nil, err
}
qbuff.WriteString(fmt.Sprintf(" AND project = '%s'", project))
if component, ok := c.opts["component"]; ok {
qbuff.WriteString(fmt.Sprintf(" AND component = '%s'", component))
}
if assignee, ok := c.opts["assignee"]; ok {
qbuff.WriteString(fmt.Sprintf(" AND assignee = '%s'", assignee))
}
if issuetype, ok := c.opts["issuetype"]; ok {
qbuff.WriteString(fmt.Sprintf(" AND issuetype = '%s'", issuetype))
}
if watcher, ok := c.opts["watcher"]; ok {
qbuff.WriteString(fmt.Sprintf(" AND watcher = '%s'", watcher))
}
if reporter, ok := c.opts["reporter"]; ok {
qbuff.WriteString(fmt.Sprintf(" AND reporter = '%s'", reporter))
}
if sort, ok := c.opts["sort"]; ok && sort != "" {
qbuff.WriteString(fmt.Sprintf(" ORDER BY %s", sort))
}
query = qbuff.String()
}
fields := []string{"summary"}
if qf, ok := c.opts["queryfields"].(string); ok {
fields = strings.Split(qf, ",")
}
json, err := jsonEncode(map[string]interface{}{
"jql": query,
"startAt": "0",
"maxResults": c.opts["max_results"],
"fields": fields,
"expand": c.expansions(),
})
func (c *Cli) FindIssues(sp SearchProvider) (*jiradata.SearchResults, error) {
req := sp.SearchRequest()
encoded, err := jsonEncode(req)
if err != nil {
return nil, err
}
uri := fmt.Sprintf("%s/rest/api/2/search", c.endpoint)
var data interface{}
if data, err = responseToJSON(c.post(uri, json)); err != nil {
uri := fmt.Sprintf("%s/reest/api/2/search", c.endpoint)
resp, err := c.post(uri, encoded)
if err != nil {
return nil, err
}
return data, nil
defer resp.Body.Close()
results := &jiradata.SearchResults{}
content, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}
err = json.Unmarshal(content, results)
if err != nil {
log.Errorf("JSON Parse Error: %s from %s", err, content)
}
return results, nil
}
// RankOrder type used to specify before/after ranking arguments to RankIssue
+10 -2
View File
@@ -4,8 +4,8 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/Netflix-Skunkworks/go-jira/data"
"github.com/howeyc/gopass"
"gopkg.in/Netflix-Skunkworks/go-jira.v1/data"
"io/ioutil"
"net/http"
"net/url"
@@ -96,7 +96,15 @@ func (c *Cli) CmdFields() error {
// CmdList will query jira and send data to "list" template
func (c *Cli) CmdList() error {
log.Debugf("list called")
data, err := c.FindIssues()
data, err := c.FindIssues(&SearchOptions{})
if err != nil {
return err
}
return runTemplate(c.getTemplate("list"), data, nil)
}
func (c *Cli) List(sp SearchProvider) error {
data, err := c.FindIssues(sp)
if err != nil {
return err
}
+67
View File
@@ -0,0 +1,67 @@
package jira
import (
"gopkg.in/Netflix-Skunkworks/go-jira.v1/data"
"bytes"
"fmt"
"strings"
)
type SearchProvider interface {
SearchRequest() *jiradata.SearchRequest
}
type SearchOptions struct {
Assignee string
Query string
QueryFields string
Project string
Component string
IssueType string
Watcher string
Reporter string
Sort string
MaxResults int
}
func (o *SearchOptions) SearchRequest() *jiradata.SearchRequest {
req := &jiradata.SearchRequest{}
if o.Query == "" {
qbuff := bytes.NewBufferString("resolution = unresolved")
if o.Project == "" {
qbuff.WriteString(fmt.Sprintf(" AND project = '%s'", o.Project))
}
if o.Component != "" {
qbuff.WriteString(fmt.Sprintf(" AND component = '%s'", o.Component))
}
if o.Assignee != "" {
qbuff.WriteString(fmt.Sprintf(" AND assignee = '%s'", o.Assignee))
}
if o.IssueType != "" {
qbuff.WriteString(fmt.Sprintf(" AND issuetype = '%s'", o.IssueType))
}
if o.Watcher != "" {
qbuff.WriteString(fmt.Sprintf(" AND watcher = '%s'", o.Watcher))
}
if o.Reporter != "" {
qbuff.WriteString(fmt.Sprintf(" AND reporter = '%s'", o.Reporter))
}
if o.Sort != "" {
qbuff.WriteString(fmt.Sprintf(" ORDER BY %s", o.Sort))
}
req.JQL = qbuff.String()
} else {
req.JQL = o.Query
}
req.Fields = append(req.Fields, "summary")
if o.QueryFields != "" {
fields := strings.Split(o.QueryFields, ",")
req.Fields = append(req.Fields, fields...)
}
req.StartAt = 0
req.MaxResults = o.MaxResults
return req
}
+9 -19
View File
@@ -3,34 +3,24 @@ package main
import (
"bytes"
"fmt"
"github.com/Netflix-Skunkworks/go-jira/lib"
"github.com/coryb/optigo"
"gopkg.in/coryb/yaml.v2"
"gopkg.in/op/go-logging.v1"
"io/ioutil"
"os"
"os/exec"
"strings"
"github.com/coryb/optigo"
logging "github.com/op/go-logging"
"gopkg.in/Netflix-Skunkworks/go-jira.v1/cli"
"gopkg.in/Netflix-Skunkworks/go-jira.v1/lib"
"gopkg.in/coryb/yaml.v2"
)
var (
log = logging.MustGetLogger("jira")
defaultFormat = "%{color}%{time:2006-01-02T15:04:05.000Z07:00} %{level:-5s} [%{shortfile}]%{color:reset} %{message}"
)
func main() {
logBackend := logging.NewLogBackend(os.Stderr, "", 0)
format := os.Getenv("JIRA_LOG_FORMAT")
if format == "" {
format = defaultFormat
}
logging.SetBackend(
logging.NewBackendFormatter(
logBackend,
logging.MustStringFormatter(format),
),
)
logging.SetLevel(logging.NOTICE, "")
jiracli.InitLogging()
user := os.Getenv("USER")
home := os.Getenv("HOME")
@@ -211,7 +201,7 @@ Command Options:
os.Exit(0)
},
"v|verbose+": func() {
logging.SetLevel(logging.GetLevel("")+1, "")
jiracli.VerboseLogging()
},
"dryrun": setopt,
"b|browse": setopt,
@@ -344,7 +334,7 @@ Command Options:
err = c.CmdEdit(args[0])
} else {
var data interface{}
if data, err = c.FindIssues(); err == nil {
if data, err = c.FindIssues(&jira.SearchOptions{}); err == nil {
issues := data.(map[string]interface{})["issues"].([]interface{})
for _, issue := range issues {
if err = c.CmdEdit(issue.(map[string]interface{})["key"].(string)); err != nil {