Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bd8b95a

Browse filesBrowse files
Trotttargos
authored andcommitted
tools: remove last of error-masking in commit-queue.sh
Remove the lats of the unintentional error-masking in commit-queue.sh. With this change, `tools/lint-sh.js . --from-npx` at last passes. PR-URL: #41356 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 9284d24 commit bd8b95a
Copy full SHA for bd8b95a

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Collapse file

‎tools/actions/commit-queue.sh‎

Copy file name to clipboardExpand all lines: tools/actions/commit-queue.sh
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,14 @@ for pr in "$@"; do
8383
else
8484
# If there's only one commit, we can use the Squash and Merge feature from GitHub.
8585
# TODO: use `gh pr merge` when the GitHub CLI allows to customize the commit title (https://github.com/cli/cli/issues/1023).
86+
commit_title=$(git log -1 --pretty='format:%s')
87+
commit_body=$(git log -1 --pretty='format:%b')
88+
commit_head=$(grep 'Fetched commits as' output | cut -d. -f3 | xargs git rev-parse)
89+
8690
jq -n \
87-
--arg title "$(git log -1 --pretty='format:%s')" \
88-
--arg body "$(git log -1 --pretty='format:%b')" \
89-
--arg head "$(grep 'Fetched commits as' output | cut -d. -f3 | xargs git rev-parse)" \
91+
--arg title "${commit_title}" \
92+
--arg body "${commit_body}" \
93+
--arg head "${commit_head}" \
9094
'{merge_method:"squash",commit_title:$title,commit_message:$body,sha:$head}' > output.json
9195
cat output.json
9296
if ! gh api -X PUT "repos/${OWNER}/${REPOSITORY}/pulls/${pr}/merge" --input output.json > output; then

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.