Skip to content

refactor: remove uuid dependency and simplify database operations in …#9

Merged
pikann merged 1 commit into
masterfrom
fix/fix-duplicated-uuid-error
Jun 17, 2026
Merged

refactor: remove uuid dependency and simplify database operations in …#9
pikann merged 1 commit into
masterfrom
fix/fix-duplicated-uuid-error

Conversation

@pikann

@pikann pikann commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes the github.com/google/uuid dependency (go.mod / go.sum) across the entire plugin — ID generation is now handled by PostgreSQL.
  • Drops all client-side UUID generation from branches.go, integration.go, pull_requests.go, and webhook.go; INSERT statements no longer include an id column.
  • Switches affected queries from db.Exec to db.Query with RETURNING id (or RETURNING id, created_at) to retrieve the database-generated primary key.
  • Simplifies linkPRToTask and handlePREvent: removes the pre-SELECT that checked whether a PR was already cached (replaced by the upsert's RETURNING result).
  • github_task_branches and github_task_pr_links inserts also drop their explicit id columns.

Test plan

  • Link a repository and confirm the response returns the DB-generated repo_id.
  • Link a PR to a task (both via API and via webhook push event) and verify pr_id comes from RETURNING.
  • Link a branch to a task and confirm no regression in branch-linking behavior.
  • Verify go.mod no longer lists github.com/google/uuid.

@pikann pikann merged commit 1dd77ac into master Jun 17, 2026
3 checks passed
@pikann pikann deleted the fix/fix-duplicated-uuid-error branch June 17, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant