rename source owner, remove actorId

This commit is contained in:
hmacr committed 2025-04-13 20:29:55 +05:30
1 parent c9c5e86b72
commit f06c1d95fa
7 files changed
+17 -24

No files matched your search

+3 -3
View File
@@ -33,7 +33,7 @@ export class GitHubIssueProvider extends BaseIssueProvider {
const sources = repos.map<IssueSource>((repo) => ({
id: String(repo.id),
name: repo.name,
account: { id: String(repo.owner.id), name: repo.owner.login },
owner: { id: String(repo.owner.id), name: repo.owner.login },
service: IntegrationService.GitHub,
}));
@@ -49,7 +49,7 @@ export class GitHubIssueProvider extends BaseIssueProvider {
where: {
service: IntegrationService.GitHub,
teamId: actor.teamId,
"settings.github.installation.account.name": source.account.name,
"settings.github.installation.account.name": source.owner.name,
},
})) as Integration<IntegrationType.Embed> | undefined;
@@ -63,7 +63,7 @@ export class GitHubIssueProvider extends BaseIssueProvider {
);
const { data } = await client.createIssue({
owner: source.account.name,
owner: source.owner.name,
repo: source.name,
title,
});
+3 -5
View File
@@ -108,11 +108,9 @@ const CustomOctokit = Octokit.plugin(requestPlugin);
export class GitHub {
private static appId = env.GITHUB_APP_ID;
// private static appKey = env.GITHUB_APP_PRIVATE_KEY
// ? Buffer.from(env.GITHUB_APP_PRIVATE_KEY, "base64").toString("ascii")
// : undefined;
private static appKey = env.GITHUB_APP_PRIVATE_KEY;
private static appKey = env.GITHUB_APP_PRIVATE_KEY
? Buffer.from(env.GITHUB_APP_PRIVATE_KEY, "base64").toString("ascii")
: undefined;
private static clientId = env.GITHUB_CLIENT_ID;
private static clientSecret = env.GITHUB_CLIENT_SECRET;