File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
docs/downloads/automation-library/integrations/jira Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ manifest:
66on :
77 - pr_created
88
9- {% set ticketid = "\b[A-Za-z]+-\d+\b" %}
9+ {% set ticketid = '' %}
1010{% for ticket in tickets %}
11- {% if ( ticket | includes(regex=r/.+/)) %}
12- {% set ticketid = ticket %}
13- {% endif %}
14- {% endfor %}
11+ {% if ticket and ticket | length > 0 and ticketid == '' %}
12+ {% set ticketid = ticket %}
13+ {% endif %}
14+ {% endfor %}
1515
1616automations :
1717 jira_update_field :
@@ -22,7 +22,7 @@ automations:
2222 args :
2323 url : " {{ env.JIRA_UPDATE_PR_FIELD_WEBHOOK }}"
2424 method : POST
25- headers : ' {"Content-type": "application/json"}'
25+ headers : ' {"Content-type": "application/json", "X-Automation-Webhook-Token": "{{ env.JIRA_UPDATE_PR_FIELD_SECRET }}" }'
2626 body : ' {"issues":["{{ticketid}}"],"data":{"pr_url":"https://github.com/{{repo.owner}}/{{repo.name}}/pull/{{pr.number}}"}}'
2727
2828has :
You can’t perform that action at this time.
0 commit comments