Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 17, 2024
1 parent 7981dc9 commit f5b1862
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/canyon-platform/app/api/sourcecode/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ export async function GET(request: NextRequest) {
gitProvider;
// 对于github,其认证一般是通过Authorization头部带上token,格式为"Bearer <token>"
console.log(
`${"https://api.github.com/repos"}/repos/${id}/contents/${filepath}`,
`${"https://api.github.com"}/repos/${id}/contents/${"packages/canyon-report/" + filepath}`,
sha,
);
const githubResponse = await axios
.get(
`${"https://api.github.com"}/repos/${id}/contents/${"packages/canyon-report" + filepath}`,
`${"https://api.github.com"}/repos/${id}/contents/${"packages/canyon-report/" + filepath}`,
{
// 注意这里params中ref要改为branch,因为github API此处参数名是branch(假设你传入的sha对应的是分支名情况)
params: {
Expand Down
2 changes: 1 addition & 1 deletion tools/canyon-uploader/src/commands/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function mapCommand(params, options) {
}
const reqData = {
projectID:
projectID || process.env.CI_PROJECT_ID || process.env.GITHUB_REPOSITORY_ID,
projectID || process.env.CI_PROJECT_ID || process.env.GITHUB_REPOSITORY,
sha: sha || process.env.CI_COMMIT_SHA || process.env.GITHUB_SHA,
branch: branch || process.env.CI_COMMIT_BRANCH || process.env.GITHUB_REF,
instrumentCwd: instrumentCwd || process.cwd(),
Expand Down

0 comments on commit f5b1862

Please sign in to comment.