Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-rosianu committed Feb 15, 2024
1 parent f5cc0c9 commit 3eed3c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions action/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -188045,11 +188045,11 @@ const robot = (app) => {
async function getAccountOwner(files) {
const originalOwner = identity;
let newOwner = '';
const infoJsonFile = files.find(x => x.filename.endsWith(`/${identity}.info.json`));
const infoJsonFile = files.find(x => x.filename.endsWith(`/${identity}.json`));
if (infoJsonFile) {
const { data: infoFromPullRequest } = await axios_1.default.get(infoJsonFile.raw_url);
console.log(`typeof infoFromPullRequest = ${typeof infoFromPullRequest}. infoJsonFile=${infoJsonFile}. infoFromPullRequest=${infoFromPullRequest}`);
if (infoFromPullRequest && typeof infoFromPullRequest === 'object') {
console.log(`typeof infoFromPullRequest = ${typeof infoFromPullRequest}. infoJsonFile=${infoJsonFile}. infoFromPullRequest=${infoFromPullRequest}`);
newOwner = identity ?? '';
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ export const robot = (app: Probot) => {
const originalOwner = identity;
let newOwner: string = '';

const infoJsonFile = files.find(x => x.filename.endsWith(`/${identity}.info.json`));
const infoJsonFile = files.find(x => x.filename.endsWith(`/${identity}.json`));
if (infoJsonFile) {
const { data: infoFromPullRequest } = await axios.get(infoJsonFile.raw_url);

console.log(`typeof infoFromPullRequest = ${typeof infoFromPullRequest}. infoJsonFile=${infoJsonFile}. infoFromPullRequest=${infoFromPullRequest}`);
if (infoFromPullRequest && typeof infoFromPullRequest === 'object') {
console.log(`typeof infoFromPullRequest = ${typeof infoFromPullRequest}. infoJsonFile=${infoJsonFile}. infoFromPullRequest=${infoFromPullRequest}`);
newOwner = identity ?? '';
}
}
Expand Down

0 comments on commit 3eed3c5

Please sign in to comment.