Skip to content

Commit

Permalink
fix: payload for backend uses the owner and repo payload
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Nov 25, 2024
1 parent a5875e9 commit cd42282
Showing 1 changed file with 60 additions and 60 deletions.
120 changes: 60 additions & 60 deletions src/web/api/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export async function getPayload(ownerRepo: string, issueId: number, useOpenAi:
const filePath = path.resolve(__dirname, "../.ubiquity-os.config.yml");
const fileContent = await fs.readFile(filePath, "utf8");
const cfgFile = YAML.parse(fileContent);
const owner = ownerRepo.split("/")[0];

if (!useOpenAi) {
cfgFile.incentives.contentEvaluator.openAi = {
Expand Down Expand Up @@ -101,72 +102,71 @@ export async function getPayload(ownerRepo: string, issueId: number, useOpenAi:
},
repository: {
id: 1296269,
node_id: "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
name: "conversation-rewards",
full_name: "ubiquity-os/conversation-rewards",
node_id: `MDEwOlJlcG9zaXRvcnkxMjk2MjY5`,
name: owner,
full_name: ownerRepo,
owner: {
login: "ubiquity-os",
login: owner,
id: 159901852,
node_id: "MDQ6VXNlcjE=",
avatar_url: "https://github.com/images/error/ubiquity-os_happy.gif",
gravatar_id: "",
url: "https://api.github.com/users/ubiquity-os",
html_url: "https://github.com/ubiquity-os",
followers_url: "https://api.github.com/users/ubiquity-os/followers",
following_url: "https://api.github.com/users/ubiquity-os/following{/other_user}",
gists_url: "https://api.github.com/users/ubiquity-os/gists{/gist_id}",
starred_url: "https://api.github.com/users/ubiquity-os/starred{/owner}{/repo}",
subscriptions_url: "https://api.github.com/users/ubiquity-os/subscriptions",
organizations_url: "https://api.github.com/users/ubiquity-os/orgs",
repos_url: "https://api.github.com/users/ubiquity-os/repos",
events_url: "https://api.github.com/users/ubiquity-os/events{/privacy}",
received_events_url: "https://api.github.com/users/ubiquity-os/received_events",
type: "User",
node_id: `MDQ6VXNlcjE=`,
avatar_url: `https://github.com/images/error/${owner}_happy.gif`,
gravatar_id: ``,
url: `https://api.github.com/users/${owner}`,
html_url: `https://github.com/${owner}`,
followers_url: `https://api.github.com/users/${owner}/followers`,
following_url: `https://api.github.com/users/${owner}/following{/other_user}`,
gists_url: `https://api.github.com/users/${owner}/gists{/gist_id}`,
starred_url: `https://api.github.com/users/${owner}/starred{/owner}{/repo}`,
subscriptions_url: `https://api.github.com/users/${owner}/subscriptions`,
organizations_url: `https://api.github.com/users/${owner}/orgs`,
repos_url: `https://api.github.com/users/${owner}/repos`,
events_url: `https://api.github.com/users/${owner}/events{/privacy}`,
received_events_url: `https://api.github.com/users/${owner}/received_events`,
type: `User`,
site_admin: false,
},
private: false,
html_url: "https://github.com/ubiquity-os/conversation-rewards",
description: "This your first repo!",
html_url: `https://github.com/${ownerRepo}`,
description: `This your first repo!`,
fork: false,
url: "https://api.github.com/repos/ubiquity-os/conversation-rewards",
archive_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/{archive_format}{/ref}",
assignees_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/assignees{/user}",
blobs_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/git/blobs{/sha}",
branches_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/branches{/branch}",
collaborators_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/collaborators{/collaborator}",
comments_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/comments{/number}",
commits_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/commits{/sha}",
compare_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/compare/{base}...{head}",
contents_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/contents/{+path}",
contributors_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/contributors",
deployments_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/deployments",
downloads_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/downloads",
events_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/events",
forks_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/forks",
git_commits_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/git/commits{/sha}",
git_refs_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/git/refs{/sha}",
git_tags_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/git/tags{/sha}",
git_url: "git:github.com/ubiquity-os/conversation-rewards.git",
issue_comment_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/issues/comments{/number}",
issue_events_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/issues/events{/number}",
issues_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/issues{/number}",
keys_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/keys{/key_id}",
labels_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/labels{/name}",
languages_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/languages",
merges_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/merges",
milestones_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/milestones{/number}",
notifications_url:
"https://api.github.com/repos/ubiquity-os/conversation-rewards/notifications{?since,all,participating}",
pulls_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/pulls{/number}",
releases_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/releases{/id}",
stargazers_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/stargazers",
statuses_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/statuses/{sha}",
subscribers_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/subscribers",
subscription_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/subscription",
tags_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/tags",
teams_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/teams",
trees_url: "https://api.github.com/repos/ubiquity-os/conversation-rewards/git/trees{/sha}",
homepage: "https://github.com",
url: `https://api.github.com/repos/${ownerRepo}`,
archive_url: `https://api.github.com/repos/${ownerRepo}/{archive_format}{/ref}`,
assignees_url: `https://api.github.com/repos/${ownerRepo}/assignees{/user}`,
blobs_url: `https://api.github.com/repos/${ownerRepo}/git/blobs{/sha}`,
branches_url: `https://api.github.com/repos/${ownerRepo}/branches{/branch}`,
collaborators_url: `https://api.github.com/repos/${ownerRepo}/collaborators{/collaborator}`,
comments_url: `https://api.github.com/repos/${ownerRepo}/comments{/number}`,
commits_url: `https://api.github.com/repos/${ownerRepo}/commits{/sha}`,
compare_url: `https://api.github.com/repos/${ownerRepo}/compare/{base}...{head}`,
contents_url: `https://api.github.com/repos/${ownerRepo}/contents/{+path}`,
contributors_url: `https://api.github.com/repos/${ownerRepo}/contributors`,
deployments_url: `https://api.github.com/repos/${ownerRepo}/deployments`,
downloads_url: `https://api.github.com/repos/${ownerRepo}/downloads`,
events_url: `https://api.github.com/repos/${ownerRepo}/events`,
forks_url: `https://api.github.com/repos/${ownerRepo}/forks`,
git_commits_url: `https://api.github.com/repos/${ownerRepo}/git/commits{/sha}`,
git_refs_url: `https://api.github.com/repos/${ownerRepo}/git/refs{/sha}`,
git_tags_url: `https://api.github.com/repos/${ownerRepo}/git/tags{/sha}`,
git_url: `git:github.com/${ownerRepo}.git`,
issue_comment_url: `https://api.github.com/repos/${ownerRepo}/issues/comments{/number}`,
issue_events_url: `https://api.github.com/repos/${ownerRepo}/issues/events{/number}`,
issues_url: `https://api.github.com/repos/${ownerRepo}/issues{/number}`,
keys_url: `https://api.github.com/repos/${ownerRepo}/keys{/key_id}`,
labels_url: `https://api.github.com/repos/${ownerRepo}/labels{/name}`,
languages_url: `https://api.github.com/repos/${ownerRepo}/languages`,
merges_url: `https://api.github.com/repos/${ownerRepo}/merges`,
milestones_url: `https://api.github.com/repos/${ownerRepo}/milestones{/number}`,
notifications_url: `https://api.github.com/repos/${ownerRepo}/notifications{?since,all,participating}`,
pulls_url: `https://api.github.com/repos/${ownerRepo}/pulls{/number}`,
releases_url: `https://api.github.com/repos/${ownerRepo}/releases{/id}`,
stargazers_url: `https://api.github.com/repos/${ownerRepo}/stargazers`,
statuses_url: `https://api.github.com/repos/${ownerRepo}/statuses/{sha}`,
subscribers_url: `https://api.github.com/repos/${ownerRepo}/subscribers`,
subscription_url: `https://api.github.com/repos/${ownerRepo}/subscription`,
tags_url: `https://api.github.com/repos/${ownerRepo}/tags`,
teams_url: `https://api.github.com/repos/${ownerRepo}/teams`,
trees_url: `https://api.github.com/repos/${ownerRepo}/git/trees{/sha}`,
homepage: `https://github.com`,
language: null,
forks_count: 9,
stargazers_count: 80,
Expand Down

0 comments on commit cd42282

Please sign in to comment.