Skip to content

Commit

Permalink
duplicate pull-request-info to .git/pr
Browse files Browse the repository at this point in the history
  • Loading branch information
idr0id committed Jan 31, 2019
1 parent 93e4d0e commit f21025f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions assets/in
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ if [[ "$bitbucket_type" == "server" ]]; then
updated_at: $version.updated_at
}' > pull-request-info

cp pull-request-info .git/pr

jq -n --argjson version "${version}" --argjson pr "${pr}" '{
version: $version,
metadata: [
Expand All @@ -101,6 +103,8 @@ elif [[ "$bitbucket_type" == "cloud" ]]; then
updated_at: $pr.created_on
}' > pull-request-info

cp pull-request-info .git/pr

jq -n --argjson version "${version}" --argjson pr "${pr}" '{
version: $version,
metadata: [
Expand Down
2 changes: 1 addition & 1 deletion assets/out
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ params=$(jq -rc '.params' < "${payload}")
action=$(jq -rc '.action // ""' <<< "${params}")

path="$(realpath "${PWD}"/"${path}")/"
pr=$(cat "${path}pull-request-info")
pr=$(cat "${path}.git/pr")

eval_param() {
eval echo "$(jq -r "${1}" <<< "${params}")"
Expand Down

0 comments on commit f21025f

Please sign in to comment.