feat: add FreeBSD release builds (#832)
* feat: add FreeBSD release builds Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * chore: allow manual release dispatch Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix: stabilize release workflow on fork Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix: clean zig download artifact Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix: use valid zig target for freebsd arm Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix: disable freebsd arm release build Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix: switch freebsd build to pure go Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix: skip release publishing on forks Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix: satisfy golangci-lint for release PR --------- Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -185,6 +185,7 @@ func MigrateDropEdgeColumns(db *sql.DB) error {
|
||||
// Copy data from old table to new table (excluding deprecated columns)
|
||||
// NOTE: We use fmt.Sprintf here (not db.Exec parameters) because we're interpolating
|
||||
// column names/expressions, not values. db.Exec parameters only work for VALUES.
|
||||
// #nosec G201 - expressions are column names, not user input
|
||||
copySQL := fmt.Sprintf(`
|
||||
INSERT INTO issues_new (
|
||||
id, content_hash, title, description, design, acceptance_criteria,
|
||||
|
||||
@@ -79,7 +79,7 @@ func CheckForcePush(ctx context.Context, store storage.Storage, repoRoot, syncBr
|
||||
status.Remote = getRemoteForBranch(ctx, worktreePath, syncBranch)
|
||||
|
||||
// Fetch from remote to get latest state
|
||||
fetchCmd := exec.CommandContext(ctx, "git", "-C", repoRoot, "fetch", status.Remote, syncBranch)
|
||||
fetchCmd := exec.CommandContext(ctx, "git", "-C", repoRoot, "fetch", status.Remote, syncBranch) // #nosec G204 - repoRoot/syncBranch are validated git inputs
|
||||
fetchOutput, err := fetchCmd.CombinedOutput()
|
||||
if err != nil {
|
||||
// Check if remote branch doesn't exist
|
||||
@@ -92,7 +92,7 @@ func CheckForcePush(ctx context.Context, store storage.Storage, repoRoot, syncBr
|
||||
|
||||
// Get current remote SHA
|
||||
remoteRef := fmt.Sprintf("%s/%s", status.Remote, syncBranch)
|
||||
revParseCmd := exec.CommandContext(ctx, "git", "-C", repoRoot, "rev-parse", remoteRef)
|
||||
revParseCmd := exec.CommandContext(ctx, "git", "-C", repoRoot, "rev-parse", remoteRef) // #nosec G204 - remoteRef constructed from trusted config
|
||||
revParseOutput, err := revParseCmd.Output()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get remote SHA: %w", err)
|
||||
@@ -107,7 +107,7 @@ func CheckForcePush(ctx context.Context, store storage.Storage, repoRoot, syncBr
|
||||
|
||||
// Check if stored SHA is an ancestor of current remote SHA
|
||||
// This means remote was updated normally (fast-forward)
|
||||
isAncestorCmd := exec.CommandContext(ctx, "git", "-C", repoRoot, "merge-base", "--is-ancestor", storedSHA, status.CurrentRemoteSHA)
|
||||
isAncestorCmd := exec.CommandContext(ctx, "git", "-C", repoRoot, "merge-base", "--is-ancestor", storedSHA, status.CurrentRemoteSHA) // #nosec G204 - args derive from git SHAs we validated earlier
|
||||
if isAncestorCmd.Run() == nil {
|
||||
// Stored SHA is ancestor - normal update, no force-push
|
||||
status.Message = "Remote sync branch updated normally (fast-forward)"
|
||||
@@ -146,12 +146,12 @@ func UpdateStoredRemoteSHA(ctx context.Context, store storage.Storage, repoRoot,
|
||||
|
||||
// Get current remote SHA
|
||||
remoteRef := fmt.Sprintf("%s/%s", remote, syncBranch)
|
||||
revParseCmd := exec.CommandContext(ctx, "git", "-C", repoRoot, "rev-parse", remoteRef)
|
||||
revParseCmd := exec.CommandContext(ctx, "git", "-C", repoRoot, "rev-parse", remoteRef) // #nosec G204 - remoteRef is internal config
|
||||
revParseOutput, err := revParseCmd.Output()
|
||||
if err != nil {
|
||||
// Remote branch might not exist yet (first push)
|
||||
// Try local branch instead
|
||||
revParseCmd = exec.CommandContext(ctx, "git", "-C", repoRoot, "rev-parse", syncBranch)
|
||||
revParseCmd = exec.CommandContext(ctx, "git", "-C", repoRoot, "rev-parse", syncBranch) // #nosec G204 - branch name from config
|
||||
revParseOutput, err = revParseCmd.Output()
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get sync branch SHA: %w", err)
|
||||
|
||||
@@ -100,7 +100,7 @@ func ToPager(content string, opts PagerOptions) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
cmd := exec.Command(parts[0], parts[1:]...)
|
||||
cmd := exec.Command(parts[0], parts[1:]...) // #nosec G204 - pager command is user-configurable by design
|
||||
cmd.Stdin = strings.NewReader(content)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
|
||||
Reference in New Issue
Block a user