Skip to content

Replace personal GitHub token with GitHub App for feedback submission#3545

Merged
ComputelessComputer merged 6 commits intomainfrom
devin/1769998342-github-app-feedback
Feb 4, 2026
Merged

Replace personal GitHub token with GitHub App for feedback submission#3545
ComputelessComputer merged 6 commits intomainfrom
devin/1769998342-github-app-feedback

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 (using CHARLIE_/CHAR_ prefixes to avoid GitHub's restriction on secrets starting with GITHUB_)
  • 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

  • Verify GitHub App permissions: Ensure the app has Issues: Read & write AND Discussions: Read & write permissions
  • Verify env vars are set in Fly.io:
    • CHARLIE_APP_ID, CHARLIE_APP_PRIVATE_KEY, CHARLIE_APP_INSTALLATION_ID
    • CHAR_REPO_ID (e.g. R_kgDONa1RRQ)
    • CHAR_DISCUSSION_CATEGORY_ID (e.g. DIC_kwDONa1RRc4CnQnp for Ideas category)
  • Test bug report end-to-end: 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 end-to-end: Submit a feature request from desktop app → verify GitHub Discussion is created in the correct category
  • Remove old secret: YUJONGLEE_GITHUB_TOKEN_REPO from Fly.io after confirming new flow works

Notes

The env var names use CHARLIE_ and CHAR_ prefixes because GitHub/Infisical rejects secrets starting with GITHUB_.

The type field for issues is supported as of March 2025. Note that Octokit's TypeScript types may not include this field yet, but the API accepts it.

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

gh api graphql -f query='
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: john@hyprnote.com <john@hyprnote.com>
@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit e414ab9
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6982f7e2f0b83a00081eb4dd

@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 canceled.

Name Link
🔨 Latest commit e414ab9
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6982f7e28039270008512209

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: john@hyprnote.com <john@hyprnote.com>
Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
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.

devin-ai-integration bot and others added 3 commits February 4, 2026 07:17
- GITHUB_APP_ID -> CHARLIE_APP_ID
- GITHUB_APP_PRIVATE_KEY -> CHARLIE_APP_PRIVATE_KEY
- GITHUB_APP_INSTALLATION_ID -> CHARLIE_APP_INSTALLATION_ID
- GITHUB_REPO_ID -> CHAR_REPO_ID
- GITHUB_DISCUSSION_CATEGORY_ID -> CHAR_DISCUSSION_CATEGORY_ID

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
GitHub Issues API does not support a type field, so removing it.

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
GitHub REST API supports type field for issues as of March 2025.
See: https://github.blog/changelog/2025-03-18-github-issues-projects-rest-api-support-for-issue-types

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@ComputelessComputer ComputelessComputer merged commit 3f731e6 into main Feb 4, 2026
14 of 15 checks passed
@ComputelessComputer ComputelessComputer deleted the devin/1769998342-github-app-feedback branch February 4, 2026 08:20
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