Skip to content
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

How does one create a Webhook? #9

Open
testworksau opened this issue Dec 19, 2022 · 8 comments
Open

How does one create a Webhook? #9

testworksau opened this issue Dec 19, 2022 · 8 comments

Comments

@testworksau
Copy link

testworksau commented Dec 19, 2022

Hi @didrocks 👋🏼

I came across this useful looking Action today, but am a bit confused as to what the Webhook setup is meant to look like.

In Jira cloud, we can create an Action of trigger Type "Incoming webhook", that has the following three options and I'm not sure which one I should choose:

image

Moving onto the next step, we need to add a component... I'm not too sure what to add here:
image

@didrocks
Copy link
Collaborator

didrocks commented Jan 3, 2023

Hey @testworksau. You need to select the third action (no Issues from the webhook), and then, you can get the action type and selecty what to do based on its content: create a new issue, select one and update it, delete one…

@AlexSkrypnyk
Copy link

AlexSkrypnyk commented Mar 29, 2023

Automation_-_JIRA

@mcascone
Copy link

mcascone commented Jun 14, 2023

Is this the official process for creating the webhook to listen to this Action's events? It doesn't seem terribly helpful if we have to generate a unique automation on the Jira side. And if it is, then we need complete documentation, not this partial example. Thanks!

@testworksau
Copy link
Author

Hi @didrocks @AlexSkrypnyk 👋🏼

Just looking at this again; I think I might have the "Create" flow figured out based on your comments above and the GitHub Webhook docs, but can't figure out the secret sauce to Edit an issue.

I imagine I need to lookup the issue but think that would require a link from the GitHub issue to be placed in a Jira issue field. Do you have any more screenshots you could share?

image

@mai-soup
Copy link

+1, got creation working (by adding the conditional for action, thanks @testworksau for showing us that but I also had to change the value to Create, since that's apparently what the action uses even though it's not documented), but editing/moving to another status seems to require additional steps.

Not too familiar with Jira, tried setting additional fields in the issues with the GitHub URL to then find an issue with JQL to update, but keep getting invalid JSON errors for the additional fields, so I'm kinda giving up on that until further updates are posted here.

Here's the "additional fields" code I tried using (with and without quotes around the template variable):

{
   "fields": {
     "GitHub URL":  {
       "value": "{{ webhookData.id }}",
    }
  },
}

I've now created around 15 issues just to test this action and couldn't get it to work past creating a new issue in Jira when a new one is created in GitHub. More screenshots, please.

@jszwedko
Copy link

Agreed, I'm just trying to set this action up today and I'm unsure how to configure the webhook in Jira to work correctly.

@ImTheKai
Copy link

I struggle with the same thing. The creation of a new GitHub issue creates a Jira issue if I configure the webhook correctly and set it to "Create" and use the data from the POST. How did you envision updating and deleting existing issues? Where do you store the Jira ID, that needs to be used? Looking at the current post, there is no correlation, so I wonder how this actually worked?

@Sevag-abechian
Copy link

Hello Everyone, If someone found the solution to update existing issues ? I'm thinking to store the github issue.id somewhere in the Jira ticket to use it in a condition or something like this.

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

No branches or pull requests

8 participants