mirror of
https://github.com/ingress-it-solutions/gitea-code-review-action.git
synced 2025-04-21 03:26:47 +00:00
Fixed issue with Gitea
This commit is contained in:
parent
52b842f210
commit
7af7c49a6e
3 changed files with 25 additions and 21 deletions
10
dist/index.js
vendored
10
dist/index.js
vendored
|
@ -39231,13 +39231,15 @@ async function run() {
|
||||||
const prNumber = github.context.payload.number || github.context.payload.issue.number; // get number from a pull request event or comment event
|
const prNumber = github.context.payload.number || github.context.payload.issue.number; // get number from a pull request event or comment event
|
||||||
|
|
||||||
// Get the code to analyze from the review comment
|
// Get the code to analyze from the review comment
|
||||||
var content = comment && comment.body || "";
|
|
||||||
|
|
||||||
const url = `${githubBaseURL}/${repoOwner}/${repoName}/pulls/${prNumber}`;
|
|
||||||
core.debug(`diff url: ${url}`);
|
var content = comment && comment.body || '';
|
||||||
|
|
||||||
|
const url = `${giteaBaseURL}/api/v1/repos/${repoOwner}/${repoName}/pulls/${prNumber}/diff`;
|
||||||
|
console.log(`diff url: ${url}`);
|
||||||
var response = await axios.get(url, {
|
var response = await axios.get(url, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${githubToken}`,
|
Authorization: `token ${giteaToken}`,
|
||||||
Accept: 'application/vnd.github.diff'
|
Accept: 'application/vnd.github.diff'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
10
index.js
10
index.js
|
@ -45,13 +45,15 @@ async function run() {
|
||||||
const prNumber = github.context.payload.number || github.context.payload.issue.number; // get number from a pull request event or comment event
|
const prNumber = github.context.payload.number || github.context.payload.issue.number; // get number from a pull request event or comment event
|
||||||
|
|
||||||
// Get the code to analyze from the review comment
|
// Get the code to analyze from the review comment
|
||||||
var content = comment && comment.body || "";
|
|
||||||
|
|
||||||
const url = `${githubBaseURL}/${repoOwner}/${repoName}/pulls/${prNumber}`;
|
|
||||||
core.debug(`diff url: ${url}`);
|
var content = comment && comment.body || '';
|
||||||
|
|
||||||
|
const url = `${giteaBaseURL}/api/v1/repos/${repoOwner}/${repoName}/pulls/${prNumber}/diff`;
|
||||||
|
console.log(`diff url: ${url}`);
|
||||||
var response = await axios.get(url, {
|
var response = await axios.get(url, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${githubToken}`,
|
Authorization: `token ${giteaToken}`,
|
||||||
Accept: 'application/vnd.github.diff'
|
Accept: 'application/vnd.github.diff'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue