Closed kleneway closed 2 months ago
JACoB here...
You mentioned me on this issue and I am busy taking a look at it.
I'll continue to comment on this issue with status as I make progress.
I've completed my initial work on this issue and have created a pull request: JACoB PR for Issue Add GitHub issue webhook.
The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.
I've updated this pull request: JACoB PR for Issue Add GitHub issue webhook.
The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.
Add webhook for GitHub new issues
Description
We need to implement a webhook that creates a new todo item in the database whenever a new issue is created in the GitHub repository. This webhook should be added to the existing
src/server/webhooks/github.ts
file.Requirements
id
: Auto-generated primary key.projectId
: Foreign key to the projects table.description
: Populate with the issue's body content from GitHub.name
: Populate with the issue's title from GitHub.status
: Default to "todo".position
: Default to 0.issueId
: Populate with the GitHub issue ID.branch
: Nullable.isArchived
: Default to false.Files to Update
src/server/webhooks/github.ts
Acceptance Criteria
@jacob-ai-bot
Steps to Address Issue: 1. Trigger the webhook on new issue creation event in GitHub. 2. Extract issue's body content, title, and ID from the event data. 3. Use orchid-orm syntax to insert a new todo item into the database with the extracted information and default values for status, position, and isArchived. 4. Implement basic error handling with console logging.
Files to Update: src/server/webhooks/github.ts
task assigned to: @jacob-ai-bot