fix: 修正 findings.json 路徑重複問題
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ const api = (p) => `${GITEA_SERVER_URL.replace(/\/$/, '')}/api/v1${p}`;
|
|||||||
|
|
||||||
export async function commitAndPush(workspace) {
|
export async function commitAndPush(workspace) {
|
||||||
try {
|
try {
|
||||||
const fullPath = path.join(workspace, GITEA_REPOSITORY, FINDINGS_PATH);
|
const fullPath = path.join(workspace, FINDINGS_PATH);
|
||||||
const content = fs.readFileSync(fullPath, 'utf8');
|
const content = fs.readFileSync(fullPath, 'utf8');
|
||||||
const encoded = Buffer.from(content).toString('base64');
|
const encoded = Buffer.from(content).toString('base64');
|
||||||
const url = api(`/repos/${GITEA_REPOSITORY}/contents/${FINDINGS_PATH}`);
|
const url = api(`/repos/${GITEA_REPOSITORY}/contents/${FINDINGS_PATH}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user