issue

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PayloadType = "github.issue"

PayloadType is the event type that the On Issue trigger emits.

Variables

This section is empty.

Functions

func HasActiveWorkOrder

func HasActiveWorkOrder(tx *gorm.DB, factory *models.Factory, ref Ref) (bool, error)

HasActiveWorkOrder reports whether this factory has a task for the issue that is not closed. A closed task does not count, so a reopened issue can create a new task.

func LockWorkOrder

func LockWorkOrder(tx *gorm.DB, factory *models.Factory, ref Ref) error

LockWorkOrder serializes work-order creation for one issue in this factory. GitHub sends one webhook for each added label, so two runs for the same issue can arrive together. The lock is held until tx commits.

Types

type Ref

type Ref struct {
	Host       string
	Repository string
	Number     int
}

Ref identifies one GitHub issue by its page URL.

func RefFromEventData

func RefFromEventData(eventData any) (Ref, bool)

RefFromEventData reads the issue from a canvas root event envelope:

{ "type": "github.issue", "data": { "issue": { "html_url": "https://github.com/acme/app/issues/12" } } }

func RefFromURL

func RefFromURL(rawURL string) (Ref, bool)

RefFromURL reads the issue from a page URL with the path /{owner}/{repo}/issues/{number}.

Jump to

Keyboard shortcuts

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