Skip to content

Commit

Permalink
ci: commit relevant commits as a file
Browse files Browse the repository at this point in the history
  • Loading branch information
krtk6160 committed Dec 21, 2023
1 parent fd2c901 commit c486971
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
14 changes: 3 additions & 11 deletions ci/apps/tasks/open-charts-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ for file in "${app_src_files[@]}"; do
git checkout "$ref" -- "$file"
done

echo "${relevant_commits[@]}" > relevant_commits.json
git add relevant_commits.json

git commit -m "Commit state of \`${APP}\` at \`${ref}\`" --allow-empty
git push -fu origin ${APP}-${ref}

Expand All @@ -78,17 +81,6 @@ Code diff contained in this image:
${github_url}/compare/${APP}-${old_ref}...${APP}-${ref}
Relevant commits:
EOF

for commit in ${relevant_commits[@]}; do
cat <<EOF >> ../body.md
- ${github_url}/commit/${commit}
EOF
done

cat <<EOF >> ../body.md
The ${APP} image will be bumped to digest:
\`\`\`
${digest}
Expand Down
14 changes: 3 additions & 11 deletions ci/tasks/open-charts-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ for file in "${app_src_files[@]}"; do
git checkout "$ref" -- "$file"
done

# put the relevant commits as a json array in a file
echo "${relevant_commits[@]}" > relevant_commits.json

git commit -m "Commit state of \`core\` at \`${ref}\`" --allow-empty
git push -fu origin core-${ref}

Expand All @@ -79,17 +82,6 @@ Code diff contained in this image:
${github_url}/compare/core-${old_ref}...core-${ref}
Relevant commits:
EOF

for commit in ${relevant_commits[@]}; do
cat <<EOF >> ../body.md
- ${github_url}/commit/${commit}
EOF
done

cat <<EOF >> ../body.md
The galoy api image will be bumped to digest:
\`\`\`
${digest}
Expand Down

0 comments on commit c486971

Please sign in to comment.