push-to-repo
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -85,6 +85,8 @@ #!/usr/bin/env node | ||
const filePath = `${CI_VARS.projectDir}/${FILE_NAME}` | ||
const fileUrl = encodeURIComponent(FILE_NAME) | ||
debug('filePath: ', filePath) | ||
debug('fileUrl: ', fileUrl) | ||
debug('api.defaults.baseURL: ', api.defaults.baseURL) | ||
const fileContents = await fs.readFile(filePath, 'utf8') | ||
const url = `/projects/${CI_VARS.projectId}/repository/files/${FILE_NAME}` | ||
const url = `/projects/${CI_VARS.projectId}/repository/files/${fileUrl}` | ||
const payload = { | ||
@@ -113,3 +115,3 @@ branch: BRANCH, | ||
DEBUG = !!program.debug | ||
FILE_NAME = encodeURIComponent(program.fileName) | ||
FILE_NAME = program.fileName | ||
BASE_URL = program.url | ||
@@ -116,0 +118,0 @@ |
# Changelog | ||
## v0.0.4 - 2020-12-26 | ||
## v0.0.5 - 2020-12-26 | ||
@@ -5,0 +5,0 @@ - Fix: properly URL encode file path. |
{ | ||
"name": "push-to-repo", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Commit changes back to the repo from a GitLab CI job.", | ||
@@ -5,0 +5,0 @@ "main": "bin/index.js", |
6541
122