Reference in New Issue
Block a user
Delete Branch "fix/quick-wins"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes
--versionflag and log version on startuprefquery parameter inGetFileContentRef(branch names with/,+, spaces)go vetto release workflowDetails
urlvariable toreqURLinGetFileContentRefto avoid shadowing thenet/urlpackage importgo vetcleanCloses #7, closes #9, closes #13
Summary
Changes are small, focused, and correct: version flag and startup logging are implemented cleanly, ref is properly URL-escaped to handle special characters, and go vet is added to the release workflow. CI is passing.
Recommendation
APPROVE — The updates are solid and align with the repository’s conventions. Using url.QueryEscape for the ref parameter is appropriate for query values and resolves issues with slashes, plus signs, and spaces in branch names. Adding go vet to the workflow is a welcome improvement. Consider a future cleanup to consistently avoid local variables named 'url' in gitea/client.go for readability now that the net/url package is imported, and evaluate whether path segments like 'filepath' should be path-escaped when constructing raw file URLs. These are non-blocking suggestions. Proceed to merge.
Summary
Changes are small, sensible, and improve behavior (adds a --version flag, fixes query-escaping for the ref, and runs go vet in the release workflow). No CI failures reported and the modifications avoid the url package shadowing issue.
Findings
gitea/client.gogitea/client.gocmd/review-bot/main.go.gitea/workflows/release.ymlRecommendation
APPROVE — Approve these changes. The version flag and ref escaping are correct and helpful improvements. For maximum robustness, consider path-escaping filepath and other URL path segments when constructing API URLs (or use net/url.URL to compose URLs), and rename the doGet parameter named 'url' to avoid shadowing/confusion. Also consider ensuring the --version flag is documented in CLI usage output. Other than these minor suggestions, the patch looks good.