Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 2, 2026

Summary

Replaces Yujong's personal GitHub token (YUJONGLEE_GITHUB_TOKEN_REPO) with a proper GitHub App for creating issues and discussions from the desktop app's feedback feature. This uses @octokit/auth-app for GitHub App authentication which provides better security, automatic token rotation, and isn't tied to a personal account.

Changes:

  • Added @octokit/auth-app, @octokit/rest, and @octokit/graphql dependencies
  • Replaced single token env var with five GitHub App env vars: GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY, GITHUB_APP_INSTALLATION_ID, GITHUB_REPO_ID, GITHUB_DISCUSSION_CATEGORY_ID
  • Bug reports → GitHub Issues with type Bug and product/desktop label
  • Feature requests → GitHub Discussions via GraphQL API
  • Refactored createGitHubIssue and addCommentToIssue to use Octokit client with App authentication
  • Added createGitHubDiscussion function for feature requests

Review & Testing Checklist for Human

  • Create GitHub App on GitHub with Issues: Read & write AND Discussions: Read & write permissions, install it on fastrepl/hyprnote repository
  • Get repository and discussion category IDs: Use GitHub GraphQL API to get GITHUB_REPO_ID (repository node ID) and GITHUB_DISCUSSION_CATEGORY_ID (the category ID for feature requests)
  • Set environment variables in Fly.io:
    • GITHUB_APP_ID
    • GITHUB_APP_PRIVATE_KEY (with \n for newlines)
    • GITHUB_APP_INSTALLATION_ID
    • GITHUB_REPO_ID
    • GITHUB_DISCUSSION_CATEGORY_ID
  • Remove old secret: YUJONGLEE_GITHUB_TOKEN_REPO from Fly.io
  • Test bug report: Submit a bug report from desktop app → verify GitHub Issue is created with type Bug and product/desktop label, and log comment is added
  • Test feature request: Submit a feature request from desktop app → verify GitHub Discussion is created in the correct category

Notes

The GraphQL mutation for creating discussions requires the repository node ID and discussion category ID, which can be obtained via:

query {
  repository(owner: "fastrepl", name: "hyprnote") {
    id
    discussionCategories(first: 10) {
      nodes { id name }
    }
  }
}

Requested by @ComputelessComputer

Link to Devin run: https://app.devin.ai/sessions/f98635e6ea4546f581d3a8f5e17b1d21

- Add @octokit/auth-app and @octokit/rest dependencies
- Replace YUJONGLEE_GITHUB_TOKEN_REPO with GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY, GITHUB_APP_INSTALLATION_ID
- Use Octokit with GitHub App authentication for creating issues and comments
- Remove issueType parameter (only use product/desktop label)

Co-Authored-By: [email protected] <[email protected]>
@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit ebf166a
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6981918c29862900085b34ec
😎 Deploy Preview https://deploy-preview-3545--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit ebf166a
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6981918ca5eb6900082b26d9
😎 Deploy Preview https://deploy-preview-3545--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

devin-ai-integration bot and others added 2 commits February 3, 2026 06:09
… GitHub Discussions

- Add @octokit/graphql dependency for GitHub Discussions API
- Add GITHUB_REPO_ID and GITHUB_DISCUSSION_CATEGORY_ID env vars
- Bug reports: create GitHub Issue with type 'Bug' and product/desktop label
- Feature requests: create GitHub Discussion via GraphQL API
- Add getInstallationToken and createGitHubDiscussion functions

Co-Authored-By: [email protected] <[email protected]>
title,
body,
labels,
type: issueType,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid parameter type passed to octokit.issues.create(). The GitHub Issues API does not have a type field. This line should be removed.

const response = await octokit.issues.create({
  owner: "fastrepl",
  repo: "hyprnote",
  title,
  body,
  labels,
  // Remove the 'type: issueType,' line
});

The issueType parameter should also be removed from the function signature on line 91 as stated in the PR description.

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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