codeant-ai-for-open-source[bot] commented on code in PR #45794:
URL: https://github.com/apache/superset/pull/45794#discussion_r4391684518
##########
.github/workflows/superset-translations.yml:
##########
@@ -109,21 +109,19 @@ jobs:
- name: Fetch base ref and create comparison worktree
if: steps.check.outputs.python == 'true' ||
steps.check.outputs.frontend == 'true'
env:
- PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# The checkout above does not persist credentials, and an anonymous
# fetch only works against a public repository. Authenticate this
# one fetch so the comparison also works in private forks/mirrors.
AUTH_HEADER="AUTHORIZATION: basic $(printf 'x-access-token:%s'
"$GH_TOKEN" | base64 | tr -d '\n')"
- # For PRs use the base branch; for direct pushes compare against the
previous commit.
- BASE_REF="$PR_BASE_REF"
- if [ -n "$BASE_REF" ]; then
- git -c "http.extraheader=$AUTH_HEADER" fetch --depth=1 origin
"$BASE_REF"
- else
- git -c "http.extraheader=$AUTH_HEADER" fetch --depth=2 origin
"$GITHUB_REF"
- fi
- git worktree add /tmp/base-worktree FETCH_HEAD
+ # Compare against the first parent of the checked-out commit: the
+ # base commit the PR merge ref was built on, or the previous commit
+ # for a direct push. Fetching the branch tip instead picks up
+ # anything merged while this job was queued, so the PR gets blamed
+ # for the difference.
+ git -c "http.extraheader=$AUTH_HEADER" fetch --depth=2 origin
"$GITHUB_SHA"
+ git worktree add /tmp/base-worktree "$GITHUB_SHA^1"
Review Comment:
**Suggestion:** For a multi-commit push, the tipโs parent already contains
earlier pushed commits, so regressions introduced by those commits are never
checked.
**Assessment:** ๐ `Major` ยท ๐ `Occurrence: Sometimes` ยท ๐ท๏ธ `Logic error`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=40a8160d0eea4bacaf9d23652aac3474&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=40a8160d0eea4bacaf9d23652aac3474&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent ๐ค </b></summary>
```mdx
This is a comment left during a code review.
**Path:** .github/workflows/superset-translations.yml
**Line:** 123:124
**Comment:**
*Logic Error: For a multi-commit push, the tipโs parent already
contains earlier pushed commits, so regressions introduced by those commits are
never checked.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45794&comment_hash=d1a1c8f52b3c4fbb01e3cd3a1073942372af94a9862e94b221d2f8eeaa07182c&reaction=like'>๐</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45794&comment_hash=d1a1c8f52b3c4fbb01e3cd3a1073942372af94a9862e94b221d2f8eeaa07182c&reaction=dislike'>๐</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]