-
Notifications
You must be signed in to change notification settings - Fork 518
Replace personal GitHub token with GitHub App for feedback submission #3545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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: [email protected] <[email protected]>
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🤖 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 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
… 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]>
Co-Authored-By: [email protected] <[email protected]>
| title, | ||
| body, | ||
| labels, | ||
| type: issueType, |
There was a problem hiding this comment.
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
Is this helpful? React 👍 or 👎 to let us know.
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/graphqldependenciesGITHUB_APP_ID,GITHUB_APP_PRIVATE_KEY,GITHUB_APP_INSTALLATION_ID,GITHUB_REPO_ID,GITHUB_DISCUSSION_CATEGORY_IDBugandproduct/desktoplabelcreateGitHubIssueandaddCommentToIssueto use Octokit client with App authenticationcreateGitHubDiscussionfunction for feature requestsReview & Testing Checklist for Human
fastrepl/hyprnoterepositoryGITHUB_REPO_ID(repository node ID) andGITHUB_DISCUSSION_CATEGORY_ID(the category ID for feature requests)GITHUB_APP_IDGITHUB_APP_PRIVATE_KEY(with\nfor newlines)GITHUB_APP_INSTALLATION_IDGITHUB_REPO_IDGITHUB_DISCUSSION_CATEGORY_IDYUJONGLEE_GITHUB_TOKEN_REPOfrom Fly.ioBugandproduct/desktoplabel, and log comment is addedNotes
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