Fixed issue with Comment on Gitea

This commit is contained in:
Bhavik MacBook PRO 16 2023-04-23 19:18:20 +05:30
parent b540e7ba2a
commit ba5b9a6177
3 changed files with 9 additions and 17 deletions

12
dist/index.js vendored
View file

@ -39355,22 +39355,18 @@ async function run() {
} else if (sourceAt === 'gitea')
{
const comment = answerTemplate.replace('${answer}', answer);
// Make a POST request to create a comment on a pull request
const url = `${githubBaseURL}/api/v1/repos/${repoOwner}/${repoName}/issues/${prNumber}/comments`;
const headers = { 'Authorization': `token ${githubToken}` };
const data = { 'body': comment };
const headers = { 'Content-Type': 'application/json', 'Authorization': `token ${githubToken}` };
const data = { 'body': answerTemplate.replace('${answer}', answer)};
core.debug(`url: ${url}`);
core.debug(`headers: ${headers}`);
core.debug(`data: ${data}`);
await axios.post(url, data, { headers });
var response = await axios.post(url, data, { headers });
}
} catch (error) {
core.debug(error.line);
core.debug(error.content);
core.setFailed(error.message);
}
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long