lib

package
v0.0.0-...-4d3b9b5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareComments

func CompareComments(config cfg.Config, ghIssue github.Issue, jIssue jira.Issue, ghClient clients.GitHubClient, jClient clients.JIRAClient) error

CompareComments takes a GitHub issue, and retrieves all of its comments. It then matches each one to a comment in `existing`. If it finds a match, it calls UpdateComment; if it doesn't, it calls CreateComment.

func CompareIssues

func CompareIssues(config cfg.Config, ghClient clients.GitHubClient, jiraClient clients.JIRAClient) error

CompareIssues gets the list of GitHub issues updated since the `since` date, gets the list of JIRA issues which have GitHub ID custom fields in that list, then matches each one. If a JIRA issue already exists for a given GitHub issue, it calls UpdateIssue; if no JIRA issue already exists, it calls CreateIssue.

func CreateIssue

func CreateIssue(config cfg.Config, issue github.Issue, ghClient clients.GitHubClient, jClient clients.JIRAClient) error

CreateIssue generates a JIRA issue from the various fields on the given GitHub issue, then sends it to the JIRA API.

func DidIssueChange

func DidIssueChange(config cfg.Config, ghIssue github.Issue, jIssue jira.Issue) bool

DidIssueChange tests each of the relevant fields on the provided JIRA and GitHub issue and returns whether or not they differ.

func UpdateComment

func UpdateComment(config cfg.Config, ghComment github.IssueComment, jComment jira.Comment, jIssue jira.Issue, ghClient clients.GitHubClient, jClient clients.JIRAClient) error

UpdateComment compares the body of a GitHub comment with the body (minus header) of the JIRA comment, and updates the JIRA comment if necessary.

func UpdateIssue

func UpdateIssue(config cfg.Config, ghIssue github.Issue, jIssue jira.Issue, ghClient clients.GitHubClient, jClient clients.JIRAClient) error

UpdateIssue compares each field of a GitHub issue to a JIRA issue; if any of them differ, the differing fields of the JIRA issue are updated to match the GitHub issue.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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