executor

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// MaxDescriptionLength is Jira's maximum description field length in characters.
	MaxDescriptionLength = 32000
)

Variables

This section is empty.

Functions

func BuildDescription

func BuildDescription(descriptionSource, githubURL string) string

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

func CoerceField(fieldName, value string) (interface{}, bool)

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

func ExtractDescriptionSource(commentBody string) string

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.

func Run

func Run(ctx context.Context, state *common.State, issueComment *github.IssueComment, editCommentID ...int64) error

Run executes the webhook and takes action if required.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL