Skip to content

Commit

Permalink
Removed never-alone from release template, fixed up some jq magic
Browse files Browse the repository at this point in the history
  • Loading branch information
ToreMerkely committed Sep 5, 2024
1 parent c870547 commit 29fcca2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 9 additions & 5 deletions bin/never_alone/get_commit_and_pr_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@ function get_never_alone_data
local -r result_file=$1; shift

pr_data=$(gh pr list --search "${commit}" --state merged --json author,reviews,mergeCommit,mergedAt,reviewDecision,url)
pr_data_0=$(echo "$pr_data" | jq '.[0]')

commit_data=$(gh search commits --hash "${commit}" --json commit)
commit_data_0=$(echo "$commit_data" | jq '.[0]')
commit_info=$(echo $commit_data_0 | jq '.commit')

echo "{\"sha\": \"${commit}\", \"commit\": ${commit_info},\"pullRequest\": ${pr_data_0}}" | jq . > "${result_file}"
jq -n \
--arg sha "$commit" \
--argjson commit "$commit_data" \
--argjson pullRequest "$pr_data" \
'{
sha: $sha,
commit: $commit[0].commit,
pullRequest: $pullRequest[0]
}' > "${result_file}"
}


Expand Down
4 changes: 0 additions & 4 deletions release-flow-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ trail:
type: junit
- name: snyk-code
type: snyk
- name: never-alone-data
type: generic
- name: never-alone-control
type: generic
artifacts:
- name: cli-docker
attestations:
Expand Down

0 comments on commit 29fcca2

Please sign in to comment.