Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
cb2db192
Unverified
Commit
cb2db192
authored
Jul 27, 2020
by
Silvano Cerza
Committed by
GitHub
Jul 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip changelog] Add workflow to mirror issue on Jira when labeled (#875)
parent
b8475a0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletion
+50
-1
.github/workflows/jira-issue.yaml
.github/workflows/jira-issue.yaml
+50
-1
No files found.
.github/workflows/jira-issue.yaml
View file @
cb2db192
...
...
@@ -2,12 +2,16 @@ name: "Mirror new issue to Jira for grooming"
on
:
issues
:
types
:
[
opened
]
types
:
[
opened
,
labeled
]
jobs
:
create-issue
:
runs-on
:
ubuntu-latest
if
:
>
github.event.action == 'opened' &&
!contains(github.event.issue.labels.*.name, 'tracked')
env
:
JIRA_API_TOKEN
:
${{ secrets.JIRA_API_TOKEN }}
...
...
@@ -54,3 +58,48 @@ jobs:
repo: context.repo.repo,
labels: ['tracked']
})
label-issue
:
runs-on
:
ubuntu-latest
if
:
>
(github.event.issue.author_association == 'OWNER' ||
github.event.issue.author_association == 'COLLABORATOR' ||
github.event.issue.author_association == 'MEMBER') &&
github.event.action == 'labeled' &&
github.event.label.name == 'tracked'
env
:
JIRA_API_TOKEN
:
${{ secrets.JIRA_API_TOKEN }}
steps
:
-
name
:
Installs Jira CLI
uses
:
atlassian/gajira-cli@master
with
:
version
:
1.0.23
-
name
:
Writes Jira CLI configs
run
:
|
mkdir ~/.jira.d
cat <<EOM >~/.jira.d/config.yml
endpoint: ${{ secrets.JIRA_BASE_URL }}
user: ${{ secrets.JIRA_USER_EMAIL }}
authentication-method: api-token
EOM
-
name
:
Create issue
run
:
|
jira create \
--noedit \
-p ${{ secrets.JIRA_PROJECT_CODE }} \
-i Task \
-o summary="${{ github.event.issue.title }}" \
-o description="${{ github.event.issue.body }}
${{ github.event.issue.html_url }}" \
>> output
-
name
:
Set label on Jira issue
run
:
|
jira labels add \
$(cat output | awk '{split($0,a," "); print a[2]}') \
grooming arduino-cli
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment