Documentation
¶
Index ¶
- Constants
- func BuildDescription(descriptionSource, githubURL string) string
- func CoerceField(fieldName, value string) (interface{}, bool)
- func ExtractDescriptionSource(commentBody string) string
- func MergeFields(repoFields map[string]interface{}, commandFields map[string]interface{}) map[string]interface{}
- func Run(ctx context.Context, state *common.State, issueComment *github.IssueComment, ...) error
Constants ¶
const (
// MaxDescriptionLength is Jira's maximum description field length in characters.
MaxDescriptionLength = 32000
)
Variables ¶
This section is empty.
Functions ¶
func BuildDescription ¶
BuildDescription assembles the final Jira ticket description from a description source and a GitHub URL. It appends the GitHub link with proper separator formatting and handles truncation to fit within MaxDescriptionLength (32,000 characters).
func CoerceField ¶
CoerceField converts a simple string value into the JSON structure expected by the Jira API for well-known fields. Returns (coerced, true) if the field is well-known and coercion was applied, or (nil, false) if the field is not well-known or the value is empty.
func ExtractDescriptionSource ¶
ExtractDescriptionSource extracts the custom description from a comment body. If the comment contains text after the first newline (beyond the command line), that text (trimmed of leading/trailing whitespace) is returned. If no meaningful body text exists, an empty string is returned signaling the caller should fall back to the issue/PR body.
func MergeFields ¶
func MergeFields(repoFields map[string]interface{}, commandFields map[string]interface{}) map[string]interface{}
MergeFields combines repo config fields (base) with command-line field overrides. Command-line values take precedence — they replace the entire repo config value for a matching key (no deep merging). Core fields (project, summary, description, issuetype) are excluded. Keys are matched case-sensitively. Returns an empty map (not nil) when both inputs are empty.
Types ¶
This section is empty.