Skip to content

jira-translator-cdevents : translate jira issue and worklog events into ticket CDEvents #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rjalander
Copy link

This PR includes the changes for a plugin implementation of EventTranslator interface that is exposed by CDEvents Webhook Adapter to translate jira events into CDEvents.

Below are the Jira events that are currently have mappings with CDEvents and are supported by this translator.

CDEvent Type Jira Event Type
dev.cdevents.ticket.created issue_created
dev.cdevents.ticket.updated issue_updated
dev.cdevents.ticket.updated issue_commented
dev.cdevents.ticket.updated issue_assigned
dev.cdevents.ticket.updated issue_work_logged
dev.cdevents.ticket.updated issue_worklog_updated
dev.cdevents.ticket.updated issue_worklog_deleted
dev.cdevents.ticket.closed issue_generic

Note:

  • This implementation is as per the RFC proposed
  • CDEvents Ticket related events are created from sd-go main, will be updated once sdk-go v0.4 released
  • webhook-adapter dependency also will be updated once sdk-go v0.4 released

Signed-off-by: Jalander Ramagiri @rjalander

Jalander Ramagiri added 4 commits July 25, 2024 14:38
Signed-off-by: Jalander Ramagiri <[email protected]>
Signed-off-by: Jalander Ramagiri <[email protected]>
Signed-off-by: Jalander Ramagiri <[email protected]>
Copy link
Collaborator

@xibz xibz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of my comments are very minor, so should be able to be resolved fairly quickly

Comment on lines +31 to +32
pEvent = &JiraEvent{event}
return
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pEvent = &JiraEvent{event}
return
return &JiraEvent{event}

Event string
}

func NewJiraEvent(event string) (pEvent *JiraEvent) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func NewJiraEvent(event string) (pEvent *JiraEvent) {
func NewJiraEvent(event string) *JiraEvent {

"net/http"
)

type JiraEvent struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is only a single string field, we can do something like this instead

type JiraEvent string

Copy link
Collaborator

@xibz xibz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of my comments are very minor, so should be able to be resolved fairly quickly

@joeblew999
Copy link

Hey @rjalander :)

Is this abandoned ? Wondering how we get this in. Would be cool.

@xibz
Copy link
Collaborator

xibz commented May 4, 2025

@joeblew999 Howdy! @rjalander has moved to a different company, but this is something we can pick up in CDEvents. Ill take a look at this and see if I can help get this in.

We have an implantation SIG that discusses topics like this which occurs every other Tuesday. Take a look at this calendar: https://calendar.google.com/calendar/u/0/embed?src=linuxfoundation.org_mhf0kmgedn67ihni8r129avp24@group.calendar.google.com&ctz=UTC

It includes all CDF project, but the implementation SIG is also in there.

@afrittoli
Copy link

@joeblew999 The original contributor (@rjalander) is not working on this project anymore, unfortunately. If you wanted to pick this up and continue the work, it would be very nice, the contribution would be most welcome.

@joeblew999
Copy link

Hey @rjalander @xibz

that was quick !

I cant help right now.

Tell you what would be useful is where the big picture roadmap is. CD Events are seriously useful for Secure SBOM auditing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants