Skip to content

Commit c2f792f

Browse files
Merge pull request #1 from project-moonstar/actions-2-enable
"Actions v2"-enable gajira-cli
2 parents d432a79 + fcfd61c commit c2f792f

File tree

13 files changed

+265
-57
lines changed

13 files changed

+265
-57
lines changed

.dockerignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/setup.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push
3+
4+
name: Test setup
5+
6+
jobs:
7+
test-setup:
8+
name: Setup
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@master
13+
14+
- name: Setup
15+
uses: ./
16+
with:
17+
version: 1.0.20
18+
19+
- name: Print version
20+
run: |
21+
jira version

.gitignore

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional REPL history
57+
.node_repl_history
58+
59+
# Output of 'npm pack'
60+
*.tgz
61+
62+
# Yarn Integrity file
63+
.yarn-integrity
64+
65+
# dotenv environment variables file
66+
.env
67+
.env.test
68+
69+
# parcel-bundler cache (https://parceljs.org/)
70+
.cache
71+
72+
# next.js build output
73+
.next
74+
75+
# nuxt.js build output
76+
.nuxt
77+
78+
# vuepress build output
79+
.vuepress/dist
80+
81+
# Serverless directories
82+
.serverless/
83+
84+
# FuseBox cache
85+
.fusebox/
86+
87+
# DynamoDB Local files
88+
.dynamodb/

Dockerfile

Lines changed: 0 additions & 19 deletions
This file was deleted.

README.md

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,22 @@
1-
# Jira CLI
2-
Wrapped go-jira CLI action. Check out [go-jira documentation](https://github.com/Netflix-Skunkworks/go-jira) for more arguments and usage details
1+
# setup-jira
2+
Download and set up go-jira CLI. Check out [go-jira documentation](https://github.com/Netflix-Skunkworks/go-jira) for more arguments and usage details
33

44
For examples on how to use this, check out the [gajira-demo](https://github.com/atlassian/gajira-demo) repository
5+
56
> ##### Only supports Jira Cloud. Does not support Jira Server (hosted)
67
78
## Usage
89

9-
> ##### Note: this action requires [Jira Login Action](https://github.com/marketplace/actions/jira-login)
10-
11-
Example workflow to add a comment to an issue:
10+
#### Set up
1211
```
13-
workflow "Comment issue" {
14-
on = "push"
15-
resolves = ["Jira Login"]
16-
}
17-
18-
action "Jira Login" {
19-
uses = "atlassian/gajira-login@v1.0.0"
20-
secrets = ["JIRA_BASE_URL", "JIRA_USER_EMAIL", "JIRA_API_TOKEN"]
21-
}
22-
23-
action "Jira CLI" {
24-
needs = "Jira Login"
25-
uses = "atlassian/gajira-cli@v1.0.0"
26-
args = "--issue=GA-1 --comment=\"Actions in action\""
27-
}
12+
- name: Setup
13+
uses: atlassian/gajira-cli@master
14+
with:
15+
version: 1.0.20
2816
```
2917

30-
----
31-
## Action Spec
32-
### Reads fields from config file at $HOME/.jira.d/config.yml
33-
- `endpoint` - base URL of Jira instance
34-
- `email` - Jira user email
35-
36-
### Reads from $HOME/.jira.d/credentials
37-
- `JIRA_API_TOKEN` - Authentication token saved by [Jira Login Action](https://github.com/marketplace/actions/jira-login)
18+
#### Usage in later workflow steps
19+
```
20+
- name: Make comment on Jira issue
21+
run: jira --issue=GA-1 --comment=\"Actions in action\""
22+
```

action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# JavaScript action
2+
name: setup-jira
3+
4+
description: Set up Jira CLI
5+
6+
inputs:
7+
version:
8+
description: Version of the CLI to use
9+
required: false
10+
default: 1.0.20
11+
12+
runs:
13+
using: 'node12'
14+
main: './dist/index.js'

dist/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/unzip

170 KB
Binary file not shown.

dist/unzip-darwin

181 KB
Binary file not shown.

entrypoint.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)