test issue#146
Conversation
🤖 Augment PR SummarySummary: This PR refactors how Changes:
Technical Notes: The intent appears to be fewer round-trips and better responsiveness by parallelizing independent git calls and deferring the single GitHub API call until org/repo are known. 🤖 Was this summary useful? React with 👍 or 👎 |
| } | ||
|
|
||
| // getParentRepoByOrgRepo fetches the parent repository full name via the GitHub API. | ||
| func getParentRepoByOrgRepo(wd, org, repo string) (string, error) { |
There was a problem hiding this comment.
In non-fork repositories, gh api ... --jq .parent.full_name may yield null, which would be returned as a non-empty string and could incorrectly trigger fork/upstream behavior (e.g., treating parent repo as "null"). Consider normalizing a missing parent (null) to an empty value before returning.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| oldSize = newFileSize | ||
| case `??`: | ||
| newFileSize, err2 = getFileSize(wd, name) | ||
| case `AD`: |
There was a problem hiding this comment.
Porcelain status AD typically means “added to index, deleted in working tree”; the file can still be staged and included in the next commit. Skipping it here may cause staged additions (including large files) to bypass whatever checks rely on getListOfChangedFiles().
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| b.Helper() | ||
| out, err := exec.Command("git", "rev-parse", "--show-toplevel").Output() | ||
| require.NoError(b, err) | ||
| return string(out[:len(out)-1]) // trim trailing newline |
There was a problem hiding this comment.
test issue