Skip to content

Commit

Permalink
Add startGroup and endGroup functions to @actions/core
Browse files Browse the repository at this point in the history
This commit adds the startGroup and endGroup functions to the @actions/core module. It also imports the info function from the console module. The startGroup function is used to start a new group in the GitHub Actions workflow, while the endGroup function is used to end a group. The info function is used to log information to the console.
  • Loading branch information
austenstone committed Jan 30, 2024
1 parent 47799f2 commit ad8f72d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { getInput, group, setOutput } from "@actions/core";
import { endGroup, getInput, group, setOutput, startGroup } from "@actions/core";
import { getSecretScanningAlerts, getCodeScanningAlerts, getDependabotAlerts, getOctokit } from "./github-security";
import { info } from "console";

interface Input {
token: string;
Expand All @@ -26,11 +27,14 @@ export function getInputs(): Input {
return result;
}


export const run = async (): Promise<void> => {
const input = getInputs();
const octokit = getOctokit(input.token);

startGroup('Getting GitHub Security Alerts');
info(`Settings: ${JSON.stringify(input)}`);
endGroup();

if (input.dependabot) {
const dependabotAlerts = group('Dependabot Alerts', async () => {
return getDependabotAlerts(octokit, input);
Expand Down

0 comments on commit ad8f72d

Please sign in to comment.