Replace personal GitHub token with GitHub App for feedback submission#3545
Merged
ComputelessComputer merged 6 commits intomainfrom Feb 4, 2026
Merged
Replace personal GitHub token with GitHub App for feedback submission#3545ComputelessComputer merged 6 commits intomainfrom
ComputelessComputer merged 6 commits intomainfrom
Conversation
- 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>
✅ Deploy Preview for hyprnote canceled.
|
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
… 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, |
Contributor
There was a problem hiding this comment.
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
Is this helpful? React 👍 or 👎 to let us know.
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-appfor GitHub App authentication which provides better security, automatic token rotation, and isn't tied to a personal account.Changes:
@octokit/auth-app,@octokit/rest, and@octokit/graphqldependenciesCHARLIE_/CHAR_prefixes to avoid GitHub's restriction on secrets starting withGITHUB_)type: "Bug"andproduct/desktoplabelcreateGitHubIssueandaddCommentToIssueto use Octokit client with App authenticationcreateGitHubDiscussionfunction for feature requestsReview & Testing Checklist for Human
CHARLIE_APP_ID,CHARLIE_APP_PRIVATE_KEY,CHARLIE_APP_INSTALLATION_IDCHAR_REPO_ID(e.g.R_kgDONa1RRQ)CHAR_DISCUSSION_CATEGORY_ID(e.g.DIC_kwDONa1RRc4CnQnpfor Ideas category)type: Bugandproduct/desktoplabel, and log comment is addedYUJONGLEE_GITHUB_TOKEN_REPOfrom Fly.io after confirming new flow worksNotes
The env var names use
CHARLIE_andCHAR_prefixes because GitHub/Infisical rejects secrets starting withGITHUB_.The
typefield 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:
Requested by @ComputelessComputer
Link to Devin run: https://app.devin.ai/sessions/f98635e6ea4546f581d3a8f5e17b1d21