Skip to content

Jira:Workflows:Store in Github

lbonanomi edited this page Sep 21, 2020 · 2 revisions

Workflows can be stored as XML in Github as-is. ...but in-case of new statuses a JWB file is better.

$ cat layout.v2.json
{"statuses":[]}

$ cat statuses.json 
[{"originalId":"","name":"static_filler_value","description":null,"statusCategoryId":1}]]

$ cat workflow.xml
...
# It's a Jira workflow.

zip nutbar.jwb layout.v2.json statuses.json workflow.xml

# Create a release:
curl -sn -X POST -d '{ "tag_name":"nutbar" }' https://api.github.com/repos/$USER/$REPO/releases

# Push the zipped-up jwb file to the "upload_url" from above's JSON response
curl -sn -H "Content-Type:application/zip" --data-binary @nutbar.jwb "https://uploads.github.com/repos/$USER/$REPO/releases/861279669/assets?name=foo.jwb"
Clone this wiki locally