Skip to content
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

[BUG]: Resource not accessible by integration while accessing installation resource #522

Open
1 task done
RajuGangitla opened this issue Mar 23, 2024 · 1 comment
Open
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@RajuGangitla
Copy link

RajuGangitla commented Mar 23, 2024

What happened?

import { App, Octokit } from "octokit"

const app = new App({
    appId: process.env.GITHUB_APP_ID,
    privateKey: `-----BEGIN RSA PRIVATE KEY-----
    .......................
    -----END RSA PRIVATE KEY-----`,
        oauth: {
        clientId: process.env.GITHUB_CLIENT_ID,
        clientSecret: process.env.GITHUB_CLIENT_SECRET,
    },
  });

async getConnected(user, installId: string) {
        try {

            const octokit = await app.getInstallationOctokit(Number(installId));

            const reposResponse = await octokit.request(`GET /user/installations/${installId}/repositories`, {
                installation_id: installId,
                headers: {
                    "X-GitHub-Api-Version": "2022-11-28",
                },
            })

            return reposResponse.data

        } catch (error) {
            const handledError = CustomErrorHandler.handle(error)
            throw handledError
        }
    }
   {
   "statusCode": 500,
   "message": "Resource not accessible by integration",
   "error": "Internal Server Error"
}

Versions

	"octokit": "^3.1.0",
             node   :  v20.9.0

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@RajuGangitla RajuGangitla added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Mar 23, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants