Skip to content
Snippets Groups Projects
Commit ac16719d authored by Ciro Santilli's avatar Ciro Santilli
Browse files

action: remove logs

parent 2f0d305e
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,6 @@ for (const image of images) { ...@@ -47,7 +47,6 @@ for (const image of images) {
// Prepare reply body. // Prepare reply body.
const payload = github.context.payload const payload = github.context.payload
console.log('payload: ' + require('util').inspect(payload))
const isComment = payload.comment !== undefined; const isComment = payload.comment !== undefined;
let titleAndBody; let titleAndBody;
let author; let author;
...@@ -199,14 +198,12 @@ try { ...@@ -199,14 +198,12 @@ try {
repo: 'news', repo: 'news',
per_page: 1, per_page: 1,
}) })
console.log('commits: ' + require('util').inspect(commits, { depth: null }))
const sha = commits.data[0].sha const sha = commits.data[0].sha
const commit = await octokit.rest.repos.getCommit({ const commit = await octokit.rest.repos.getCommit({
owner: 'duty-machine', owner: 'duty-machine',
repo: 'news', repo: 'news',
ref: sha, ref: sha,
}) })
console.log('commit: ' + require('util').inspect(commit, { depth: null }))
let filename let filename
for (const file of commit.data.files) { for (const file of commit.data.files) {
filename = file.filename filename = file.filename
...@@ -214,16 +211,13 @@ try { ...@@ -214,16 +211,13 @@ try {
break break
} }
} }
console.log('filename: ' + require('util').inspect(filename, { depth: null }));
const content = await octokit.rest.repos.getContent({ const content = await octokit.rest.repos.getContent({
owner: 'duty-machine', owner: 'duty-machine',
repo: 'news', repo: 'news',
ref: sha, ref: sha,
path: filename, path: filename,
}) })
console.log('content: ' + require('util').inspect(content, { depth: null }));
contentS = Buffer.from(content.data.content, 'base64').toString('utf-8') contentS = Buffer.from(content.data.content, 'base64').toString('utf-8')
console.error('contentS: ' + require('util').inspect(contentS))
const lines = contentS.split('\n') const lines = contentS.split('\n')
const titleAndLink = lines[1] const titleAndLink = lines[1]
const match = titleAndLink.match(/\[([^\]]+)\]\(([^)]+)\)/) const match = titleAndLink.match(/\[([^\]]+)\]\(([^)]+)\)/)
...@@ -237,7 +231,6 @@ try { ...@@ -237,7 +231,6 @@ try {
body: content.data.html_url + '\n\n' + link + '\n\n' + html_url + '\n\n' + body, body: content.data.html_url + '\n\n' + link + '\n\n' + html_url + '\n\n' + body,
labels: ['duty-machine'], labels: ['duty-machine'],
}) })
console.error('new_issue_duty: ' + require('util').inspect(new_issue_duty, { depth: null }))
} }
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment