-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
45 lines (45 loc) · 1.46 KB
/
action.yml
File metadata and controls
45 lines (45 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Add comment to a Jira issue
description: Adds comments to a list of specified Jira issues by their specified ID's.
author: Mathias Mortensen
inputs:
message:
description: The message to post in the Jira comment
required: true
issues:
description: Comma separated string of Jira issue ids. Example 'OK-1879,OK-1785,OK-1734'
required: true
jira-base-url:
description: The URL to the Jira instance.
required: true
default: https://shapedk.atlassian.net
jira-user-email:
description: The Jira user who should post the comment.
required: true
default: ci@shape.dk
op-jira-api-token-reference:
description: 1Password reference to a Jira API token
required: true
runs:
using: composite
steps:
- name: Install 1Password CLI
uses: 1password/install-cli-action@v2
with:
version: 2.18.0
- name: Jira API token
id: api-token
run: |
api_token=$(op read "${{ inputs.op-jira-api-token-reference }}")
echo "token=$api_token" >> $GITHUB_OUTPUT
shell: bash
- name: Login to Jira
uses: atlassian/gajira-login@v3
env:
JIRA_BASE_URL: ${{ inputs.jira-base-url }}
JIRA_USER_EMAIL: ${{ inputs.jira-user-email }}
JIRA_API_TOKEN: ${{ steps.api-token.outputs.token }}
- name: Comment on issues
uses: shapehq/gajira-comment@feature/multiple-issues
with:
issues: ${{ inputs.issues }}
comment: ${{ inputs.message }}