Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function main() {
try {
``;
const octokit = new Octokit();
const { query, ...variables } = getAllInputs();
core.info(query);
for (const [name, value] of Object.entries(variables)) {
core.info(`> ${name}: ${value}`);
}
const time = Date.now();
const data = await octokit.graphql(query, variables);
core.info(`< 200 ${Date.now() - time}ms`);
core.setOutput("data", JSON.stringify(data, null, 2));
} catch (error) {
core.debug(inspect(error));
core.setFailed(error.message);
async function main() {
try {
const octokit = new Octokit();
const { route, ...parameters } = getAllInputs();
core.info(route);
for (const [name, value] of Object.entries(parameters)) {
core.info(`> ${name}: ${value}`);
}
core.debug(`route: ${inspect(route)}`);
core.debug(`parameters: ${inspect(parameters)}`);
core.debug(
`parsed request options: ${inspect(
octokit.request.endpoint(route, parameters)
)}`
);
const time = Date.now();
async function main() {
const octokit = new Octokit();
const payload = JSON.parse(
readFileSync(process.env.GITHUB_EVENT_PATH, "utf8")
);
const ref = process.env.GITHUB_REF;
const sha = process.env.GITHUB_SHA;
const state = {
toolkit,
octokit,
payload,
ref,
sha,
startedAt: new Date().toISOString(),
twitterCredentials: {
consumer_key: process.env.TWITTER_API_KEY,