Add comments
This commit is contained in:
parent
2ef783f579
commit
03ecc1e887
2
index.js
2
index.js
|
@ -2,10 +2,12 @@ const core = require('@actions/core');
|
||||||
const github = require('@actions/github');
|
const github = require('@actions/github');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// `who-to-greet` input defined in action metadata file
|
||||||
const nameToGreet = core.getInput('who-to-greet');
|
const nameToGreet = core.getInput('who-to-greet');
|
||||||
console.log(`Hello ${nameToGreet}!`);
|
console.log(`Hello ${nameToGreet}!`);
|
||||||
const time = (new Date()).toTimeString();
|
const time = (new Date()).toTimeString();
|
||||||
core.setOutput("time", time);
|
core.setOutput("time", time);
|
||||||
|
// Get the JSON webhook payload for the event that triggered the workflow
|
||||||
const payload = JSON.stringify(github.context.payload, undefined, 2)
|
const payload = JSON.stringify(github.context.payload, undefined, 2)
|
||||||
console.log(`The event payload: ${payload}`);
|
console.log(`The event payload: ${payload}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue