Skip to content

Commit

Permalink
ci: fix handling of direct commits
Browse files Browse the repository at this point in the history
  • Loading branch information
krtk6160 committed Jan 12, 2024
1 parent 6553ade commit 49a76db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ci/apps/tasks/open-charts-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ for commit in $(git log --format="%H" ${old_ref}..${ref}); do
for file in ${changed_files[@]}; do
if printf '%s\n' "${app_src_files[@]}" | grep -Fxq "$file"; then
commit_message=$(git log --format="%s" -n 1 $commit)
pr_number=$(echo "$commit_message" | grep -oE '#[0-9]+' | grep -oE '[0-9]+')
pr_number=$(echo "$commit_message" | grep -oE '#[0-9]+' | sed 's/#//')

if [[ -n "$pr_number" ]]; then
pr_link="${github_url}/pull/${pr_number}"
Expand Down
2 changes: 1 addition & 1 deletion ci/core/tasks/open-charts-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ for commit in $(git log --format="%H" ${old_ref}..${ref}); do
for file in ${changed_files[@]}; do
if printf '%s\n' "${app_src_files[@]}" | grep -Fxq "$file"; then
commit_message=$(git log --format="%s" -n 1 $commit)
pr_number=$(echo "$commit_message" | grep -oE '#[0-9]+' | grep -oE '[0-9]+')
pr_number=$(echo "$commit_message" | grep -oE '#[0-9]+' | sed 's/#//')

if [[ -n "$pr_number" ]]; then
pr_link="${github_url}/pull/${pr_number}"
Expand Down

0 comments on commit 49a76db

Please sign in to comment.