Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ jobs:
external-url: JireRelease=${{ env.REL_LINK }}
# kosli-template-file: ${{ env.KOSLI_TEMPLATE_FILE }}

- name: Add trail to jira release
run: |
source scripts/lib-jira.sh
kosli_trail_link="https://app.kosli.com/${{ env.KOSLI_ORG }}/flows/${{ env.KOSLI_FLOW }}/trails/${{ env.RELEASE_ID }}"
add_trail_link_to_release ${{ env.RELEASE_ID }} ${kosli_trail_link}

- name: Report current prod SW
run: |
source scripts/lib-kosli.sh
Expand Down
14 changes: 14 additions & 0 deletions scripts/lib-jira.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,20 @@ function add_section_to_release
loud_curl_jira PUT "${url}" "${data}"
}

function add_trail_link_to_release
{
local -r releaseId=$1; shift
local -r trailUrl=$1;
local -r url="${JIRA_BASE_URL}/rest/api/3/version/${releaseId}/relatedwork"
local -r data='{
"category": "Audit",
"title": "Kosli Trail",
"url": "'${trailUrl}'"
}'
debug_log "Add related work to release ${releaseId}:\n${data}"
loud_curl_jira PUT "${url}" "${data}"
}

# Jira has no API to add an approver to a release. This must be done in the UX
# See https://community.developer.atlassian.com/t/add-approver-to-version-through-rest-api/76975
function add_approver_to_release
Expand Down