actions-up 1.12.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cli/build-json-report.d.ts +257 -0
  2. package/dist/cli/build-json-report.js +64 -0
  3. package/dist/cli/index.d.ts +3 -1
  4. package/dist/cli/index.js +132 -73
  5. package/dist/cli/resolve-scan-directories.d.ts +6 -2
  6. package/dist/cli/validate-cli-options.d.ts +20 -0
  7. package/dist/cli/validate-cli-options.js +4 -0
  8. package/dist/core/api/check-updates.js +68 -55
  9. package/dist/core/api/get-all-releases.d.ts +2 -1
  10. package/dist/core/api/get-compatible-update.d.ts +15 -5
  11. package/dist/core/api/get-latest-release.d.ts +3 -3
  12. package/dist/core/ast/utils/extract-uses-from-steps.d.ts +12 -4
  13. package/dist/core/constants.d.ts +3 -1
  14. package/dist/core/fs/find-yaml-files-recursive.js +1 -1
  15. package/dist/core/interactive/prompt-update-selection.d.ts +3 -1
  16. package/dist/core/interactive/prompt-update-selection.js +9 -9
  17. package/dist/core/parsing/parse-action-reference.d.ts +16 -12
  18. package/dist/core/scan-github-actions.d.ts +4 -1
  19. package/dist/core/scan-github-actions.js +67 -67
  20. package/dist/core/versions/get-update-level.d.ts +3 -1
  21. package/dist/package.js +1 -1
  22. package/dist/types/action-update.d.ts +30 -10
  23. package/dist/types/composite-action-runs.d.ts +12 -4
  24. package/dist/types/composite-action-step.d.ts +24 -8
  25. package/dist/types/composite-action-structure.d.ts +21 -7
  26. package/dist/types/github-action.d.ts +27 -9
  27. package/dist/types/github-client-context.d.ts +24 -8
  28. package/dist/types/github-client.d.ts +24 -8
  29. package/dist/types/release-info.d.ts +24 -8
  30. package/dist/types/scan-result.d.ts +12 -4
  31. package/dist/types/tag-info.d.ts +15 -5
  32. package/dist/types/update-mode.d.ts +3 -1
  33. package/dist/types/workflow-job.d.ts +27 -9
  34. package/dist/types/workflow-step.d.ts +21 -7
  35. package/dist/types/workflow-structure.d.ts +15 -5
  36. package/package.json +3 -8
  37. package/readme.md +94 -71
@@ -2,17 +2,17 @@ import { ACTIONS_DIRECTORY, GITHUB_DIRECTORY, WORKFLOWS_DIRECTORY } from "./cons
2
2
  import { isYamlFile } from "./fs/is-yaml-file.js";
3
3
  import { scanWorkflowFile } from "./scan-workflow-file.js";
4
4
  import { scanActionFile } from "./scan-action-file.js";
5
- import { readFile, readdir, stat } from "node:fs/promises";
6
5
  import { isAbsolute, join, relative, resolve } from "node:path";
7
- async function scanGitHubActions(d = process.cwd(), m = GITHUB_DIRECTORY) {
6
+ import { readFile, readdir, stat } from "node:fs/promises";
7
+ async function scanGitHubActions(p = process.cwd(), m = GITHUB_DIRECTORY) {
8
8
  let h = {
9
9
  compositeActions: /* @__PURE__ */ new Map(),
10
10
  workflows: /* @__PURE__ */ new Map(),
11
11
  actions: []
12
- }, g = resolve(d);
13
- function _(e, o) {
14
- let s = relative(e, o);
15
- return s !== "" && !s.startsWith("..") && !isAbsolute(s);
12
+ }, g = resolve(p);
13
+ function _(e, a) {
14
+ let o = relative(e, a);
15
+ return o !== "" && !o.startsWith("..") && !isAbsolute(o);
16
16
  }
17
17
  let v = join(g, m);
18
18
  function y(e) {
@@ -20,8 +20,8 @@ async function scanGitHubActions(d = process.cwd(), m = GITHUB_DIRECTORY) {
20
20
  }
21
21
  async function b(e) {
22
22
  try {
23
- let o = await stat(e);
24
- return typeof o.isFile == "function" ? o.isFile() : !1;
23
+ let a = await stat(e);
24
+ return typeof a.isFile == "function" ? a.isFile() : !1;
25
25
  } catch {
26
26
  return !1;
27
27
  }
@@ -30,13 +30,13 @@ async function scanGitHubActions(d = process.cwd(), m = GITHUB_DIRECTORY) {
30
30
  try {
31
31
  if ((await stat(x)).isDirectory()) {
32
32
  let e = (await readdir(x)).filter((e) => y(e) ? isYamlFile(e) : !1).map(async (e) => {
33
- let o = join(x, e);
33
+ let a = join(x, e);
34
34
  try {
35
- let c = await scanWorkflowFile(o);
35
+ let s = await scanWorkflowFile(a);
36
36
  return {
37
37
  path: `${m}/${WORKFLOWS_DIRECTORY}/${e}`,
38
38
  success: !0,
39
- actions: c
39
+ actions: s
40
40
  };
41
41
  } catch {
42
42
  return {
@@ -45,111 +45,111 @@ async function scanGitHubActions(d = process.cwd(), m = GITHUB_DIRECTORY) {
45
45
  actions: []
46
46
  };
47
47
  }
48
- }), o = await Promise.all(e);
49
- for (let e of o) e.success && e.path && (e.actions.length > 0 ? (h.workflows.set(e.path, e.actions), h.actions.push(...e.actions)) : h.workflows.set(e.path, []));
48
+ }), a = await Promise.all(e);
49
+ for (let e of a) e.success && e.path && (e.actions.length > 0 ? (h.workflows.set(e.path, e.actions), h.actions.push(...e.actions)) : h.workflows.set(e.path, []));
50
50
  }
51
51
  } catch {}
52
52
  try {
53
- let e = join(g, "action.yml"), o = join(g, "action.yaml"), s = null, c = [];
53
+ let e = join(g, "action.yml"), a = join(g, "action.yaml"), o = null, s = [];
54
54
  if (await b(e)) try {
55
- c = await scanActionFile(e), s = e;
55
+ s = await scanActionFile(e), o = e;
56
56
  } catch {
57
- s = null;
57
+ o = null;
58
58
  }
59
- if (!s && await b(o)) try {
60
- c = await scanActionFile(o), s = o;
59
+ if (!o && await b(a)) try {
60
+ s = await scanActionFile(a), o = a;
61
61
  } catch {
62
- s = null;
62
+ o = null;
63
63
  }
64
- if (s) {
65
- let e = relative(g, s);
66
- h.compositeActions.set(e, e), c.length > 0 && h.actions.push(...c);
64
+ if (o) {
65
+ let e = relative(g, o);
66
+ h.compositeActions.set(e, e), s.length > 0 && h.actions.push(...s);
67
67
  }
68
68
  } catch {}
69
69
  let S = join(v, ACTIONS_DIRECTORY);
70
70
  try {
71
71
  if ((await stat(S)).isDirectory()) {
72
- let o = (await readdir(S)).map(async (o) => {
73
- if (!y(o)) return null;
74
- let s = join(S, o);
72
+ let a = (await readdir(S)).map(async (a) => {
73
+ if (!y(a)) return null;
74
+ let o = join(S, a);
75
75
  try {
76
- if (!(await stat(s)).isDirectory()) return null;
77
- let c = join(s, "action.yml"), l = [];
76
+ if (!(await stat(o)).isDirectory()) return null;
77
+ let s = join(o, "action.yml"), c = [];
78
78
  try {
79
- l = await scanActionFile(c);
79
+ c = await scanActionFile(s);
80
80
  } catch {
81
81
  try {
82
- c = join(s, "action.yaml"), l = await scanActionFile(c);
82
+ s = join(o, "action.yaml"), c = await scanActionFile(s);
83
83
  } catch {
84
84
  return null;
85
85
  }
86
86
  }
87
87
  return {
88
- path: `${m}/${ACTIONS_DIRECTORY}/${o}`,
89
- name: o,
90
- actions: l
88
+ path: `${m}/${ACTIONS_DIRECTORY}/${a}`,
89
+ name: a,
90
+ actions: c
91
91
  };
92
92
  } catch {
93
93
  return null;
94
94
  }
95
- }), s = await Promise.all(o);
96
- for (let e of s) e && (h.compositeActions.set(e.name, e.path), h.actions.push(...e.actions));
95
+ }), o = await Promise.all(a);
96
+ for (let e of o) e && (h.compositeActions.set(e.name, e.path), h.actions.push(...e.actions));
97
97
  }
98
98
  } catch {}
99
99
  try {
100
100
  let e = await getCurrentRepoSlug(g);
101
101
  if (e) {
102
102
  if (process.env.ACTIONS_UP_TEST_THROW === "1") throw Error("test");
103
- let o = /* @__PURE__ */ new Set(), s = [];
104
- for (let c of h.actions) {
105
- if (c.type !== "external") continue;
106
- let l = c.name.split("/");
107
- if (l.length < 3 || `${l[0]}/${l[1]}` !== e) continue;
108
- let u = join(g, ...l.slice(2));
109
- _(g, u) && (o.has(u) || (o.add(u), s.push(u)));
103
+ let a = /* @__PURE__ */ new Set(), o = [];
104
+ for (let s of h.actions) {
105
+ if (s.type !== "external") continue;
106
+ let c = s.name.split("/");
107
+ if (c.length < 3 || `${c[0]}/${c[1]}` !== e) continue;
108
+ let l = join(g, ...c.slice(2));
109
+ _(g, l) && (a.has(l) || (a.add(l), o.push(l)));
110
110
  }
111
- async function c() {
112
- if (s.length === 0) return;
113
- let l = s.splice(0), d = await Promise.all(l.map(async (s) => {
111
+ async function s() {
112
+ if (o.length === 0) return;
113
+ let c = o.splice(0), u = await Promise.all(c.map(async (o) => {
114
114
  try {
115
- let c = join(s, "action.yml"), l = join(s, "action.yaml"), d = c;
115
+ let s = join(o, "action.yml"), c = join(o, "action.yaml"), u = s;
116
116
  try {
117
- if (!(await stat(c)).isFile()) throw Error("not a file");
117
+ if (!(await stat(s)).isFile()) throw Error("not a file");
118
118
  } catch {
119
- if (!(await stat(l)).isFile()) throw Error("not a file");
120
- d = l;
119
+ if (!(await stat(c)).isFile()) throw Error("not a file");
120
+ u = c;
121
121
  }
122
- let f = await scanActionFile(d);
123
- f.length > 0 && h.actions.push(...f);
124
- let p = [];
125
- for (let s of f) {
126
- if (s.type !== "external") continue;
127
- let c = s.name.split("/");
128
- if (c.length < 3 || `${c[0]}/${c[1]}` !== e) continue;
129
- let l = join(g, ...c.slice(2));
130
- _(g, l) && (o.has(l) || (o.add(l), p.push(l)));
122
+ let d = await scanActionFile(u);
123
+ d.length > 0 && h.actions.push(...d);
124
+ let f = [];
125
+ for (let o of d) {
126
+ if (o.type !== "external") continue;
127
+ let s = o.name.split("/");
128
+ if (s.length < 3 || `${s[0]}/${s[1]}` !== e) continue;
129
+ let c = join(g, ...s.slice(2));
130
+ _(g, c) && (a.has(c) || (a.add(c), f.push(c)));
131
131
  }
132
- return p;
132
+ return f;
133
133
  } catch {
134
134
  return [];
135
135
  }
136
136
  }));
137
- for (let e of d) for (let o of e) s.push(o);
138
- await c();
137
+ for (let e of u) for (let a of e) o.push(a);
138
+ await s();
139
139
  }
140
- await c();
140
+ await s();
141
141
  }
142
142
  } catch {}
143
143
  return h;
144
144
  }
145
145
  async function getCurrentRepoSlug(e) {
146
- let o = process.env.GITHUB_REPOSITORY;
147
- if (o && /^[^\s/]+\/[^\s/]+$/u.test(o)) return o;
146
+ let a = process.env.GITHUB_REPOSITORY;
147
+ if (a && /^[^\s/]+\/[^\s/]+$/u.test(a)) return a;
148
148
  try {
149
- let o = await readFile(join(e, ".git", "config"), "utf8"), s = o.match(/\[remote "origin"\][\s\S]*?url\s*=\s*(?<url>.+)/u)?.groups?.url?.trim();
150
- if (s ||= o.match(/url\s*=\s*(?<url>.+)/u)?.groups?.url?.trim(), !s) return null;
151
- let c = s.match(/github\.com[/:](?<owner>[^/]+)\/(?<repo>[^./]+)(?:\.git)?$/u);
152
- if (c?.groups) return `${c.groups.owner}/${c.groups.repo}`;
149
+ let a = await readFile(join(e, ".git", "config"), "utf8"), o = a.match(/\[remote "origin"\][\s\S]*?url\s*=\s*(?<url>.+)/u)?.groups?.url?.trim();
150
+ if (o ||= a.match(/url\s*=\s*(?<url>.+)/u)?.groups?.url?.trim(), !o) return null;
151
+ let s = o.match(/github\.com[/:](?<owner>[^/]+)\/(?<repo>[^./]+)(?:\.git)?$/u);
152
+ if (s?.groups) return `${s.groups.owner}/${s.groups.repo}`;
153
153
  } catch {}
154
154
  return null;
155
155
  }
@@ -1,4 +1,6 @@
1
- /** Update level for a version change. */
1
+ /**
2
+ * Update level for a version change.
3
+ */
2
4
  type UpdateLevel = 'unknown' | 'major' | 'minor' | 'patch' | 'none';
3
5
  /**
4
6
  * Determine the update level between two version strings.
package/dist/package.js CHANGED
@@ -1,2 +1,2 @@
1
- const version = "1.12.0";
1
+ const version = "1.13.0";
2
2
  export { version };
@@ -1,30 +1,50 @@
1
1
  import { GitHubAction } from './github-action';
2
- /** Update information for a GitHub Action. */
2
+ /**
3
+ * Update information for a GitHub Action.
4
+ */
3
5
  export interface ActionUpdate {
4
- /** Reason for skipping the update check. */
6
+ /**
7
+ * Reason for skipping the update check.
8
+ */
5
9
  skipReason?: 'unknown' | 'branch'
6
10
 
7
- /** Current version string. */
11
+ /**
12
+ * Current version string.
13
+ */
8
14
  currentVersion: string | null
9
15
 
10
- /** Latest available version. */
16
+ /**
17
+ * Latest available version.
18
+ */
11
19
  latestVersion: string | null
12
20
 
13
- /** Status of the check for this action. */
21
+ /**
22
+ * Status of the check for this action.
23
+ */
14
24
  status?: 'skipped' | 'ok'
15
25
 
16
- /** SHA hash of the latest version. */
26
+ /**
27
+ * SHA hash of the latest version.
28
+ */
17
29
  latestSha: string | null
18
30
 
19
- /** Publication date of the latest version (null if unknown). */
31
+ /**
32
+ * Publication date of the latest version (null if unknown).
33
+ */
20
34
  publishedAt: Date | null
21
35
 
22
- /** The original action from scanning. */
36
+ /**
37
+ * The original action from scanning.
38
+ */
23
39
  action: GitHubAction
24
40
 
25
- /** Whether this is a major version change. */
41
+ /**
42
+ * Whether this is a major version change.
43
+ */
26
44
  isBreaking: boolean
27
45
 
28
- /** Whether an update is available. */
46
+ /**
47
+ * Whether an update is available.
48
+ */
29
49
  hasUpdate: boolean
30
50
  }
@@ -1,12 +1,20 @@
1
1
  import { CompositeActionStep } from './composite-action-step';
2
- /** Represents the runs configuration for a composite action. */
2
+ /**
3
+ * Represents the runs configuration for a composite action.
4
+ */
3
5
  export interface CompositeActionRuns {
4
- /** Array of steps to execute. */
6
+ /**
7
+ * Array of steps to execute.
8
+ */
5
9
  steps?: CompositeActionStep[]
6
10
 
7
- /** Allow additional properties. */
11
+ /**
12
+ * Allow additional properties.
13
+ */
8
14
  [key: string]: unknown
9
15
 
10
- /** Must be 'composite' for composite actions. */
16
+ /**
17
+ * Must be 'composite' for composite actions.
18
+ */
11
19
  using?: string
12
20
  }
@@ -1,23 +1,39 @@
1
- /** Represents a step in a composite GitHub Action. */
1
+ /**
2
+ * Represents a step in a composite GitHub Action.
3
+ */
2
4
  export interface CompositeActionStep {
3
- /** Environment variables for this step. */
5
+ /**
6
+ * Environment variables for this step.
7
+ */
4
8
  env?: Record<string, unknown>
5
9
 
6
- /** Working directory for the step. */
10
+ /**
11
+ * Working directory for the step.
12
+ */
7
13
  'working-directory'?: string
8
14
 
9
- /** Allow additional properties. */
15
+ /**
16
+ * Allow additional properties.
17
+ */
10
18
  [key: string]: unknown
11
19
 
12
- /** Shell to use for the run command. */
20
+ /**
21
+ * Shell to use for the run command.
22
+ */
13
23
  shell?: string
14
24
 
15
- /** Action to use for this step. */
25
+ /**
26
+ * Action to use for this step.
27
+ */
16
28
  uses?: string
17
29
 
18
- /** Display name for this step. */
30
+ /**
31
+ * Display name for this step.
32
+ */
19
33
  name?: string
20
34
 
21
- /** Shell command to run for this step. */
35
+ /**
36
+ * Shell command to run for this step.
37
+ */
22
38
  run?: string
23
39
  }
@@ -1,21 +1,35 @@
1
1
  import { CompositeActionRuns } from './composite-action-runs';
2
- /** Represents the structure of a composite GitHub Action file. */
2
+ /**
3
+ * Represents the structure of a composite GitHub Action file.
4
+ */
3
5
  export interface CompositeActionStructure {
4
- /** Output values from the action. */
6
+ /**
7
+ * Output values from the action.
8
+ */
5
9
  outputs?: Record<string, unknown>
6
10
 
7
- /** Input parameters for the action. */
11
+ /**
12
+ * Input parameters for the action.
13
+ */
8
14
  inputs?: Record<string, unknown>
9
15
 
10
- /** Runs configuration for composite actions. */
16
+ /**
17
+ * Runs configuration for composite actions.
18
+ */
11
19
  runs?: CompositeActionRuns
12
20
 
13
- /** Allow additional properties. */
21
+ /**
22
+ * Allow additional properties.
23
+ */
14
24
  [key: string]: unknown
15
25
 
16
- /** Description of what the action does. */
26
+ /**
27
+ * Description of what the action does.
28
+ */
17
29
  description?: string
18
30
 
19
- /** Display name of the action. */
31
+ /**
32
+ * Display name of the action.
33
+ */
20
34
  name?: string
21
35
  }
@@ -1,26 +1,44 @@
1
- /** Represents a GitHub Action used in workflows or composite actions. */
1
+ /**
2
+ * Represents a GitHub Action used in workflows or composite actions.
3
+ */
2
4
  export interface GitHubAction {
3
- /** Type of the GitHub Action. */
5
+ /**
6
+ * Type of the GitHub Action.
7
+ */
4
8
  type: 'reusable-workflow' | 'composite' | 'external' | 'docker' | 'local'
5
9
 
6
- /** Version or tag of the action (e.g., 'v1', 'main', commit SHA). */
10
+ /**
11
+ * Version or tag of the action (e.g., 'v1', 'main', commit SHA).
12
+ */
7
13
  version?: string | null
8
14
 
9
- /** Line number where the action is used in the file. */
15
+ /**
16
+ * Line number where the action is used in the file.
17
+ */
10
18
  line?: number
11
19
 
12
- /** Path to the file where this action is used. */
20
+ /**
21
+ * Path to the file where this action is used.
22
+ */
13
23
  file?: string
14
24
 
15
- /** Original `uses` string from workflow, if available. */
25
+ /**
26
+ * Original `uses` string from workflow, if available.
27
+ */
16
28
  uses?: string
17
29
 
18
- /** Name of the job where this action is used (for workflows). */
30
+ /**
31
+ * Name of the job where this action is used (for workflows).
32
+ */
19
33
  job?: string
20
34
 
21
- /** Full name of the action (e.g., 'actions/checkout'). */
35
+ /**
36
+ * Full name of the action (e.g., 'actions/checkout').
37
+ */
22
38
  name: string
23
39
 
24
- /** Original `ref` string from workflow, if available. */
40
+ /**
41
+ * Original `ref` string from workflow, if available.
42
+ */
25
43
  ref?: string
26
44
  }
@@ -6,27 +6,43 @@ import { TagInfo } from './tag-info';
6
6
  * number of API requests during a single run.
7
7
  */
8
8
  export interface GitHubClientContext {
9
- /** Lightweight caches keyed by owner/repo (+ extra payload). */
9
+ /**
10
+ * Lightweight caches keyed by owner/repo (+ extra payload).
11
+ */
10
12
  caches: {
11
- /** Cache of reference type detections (branch/tag/null). */
13
+ /**
14
+ * Cache of reference type detections (branch/tag/null).
15
+ */
12
16
  refType: Map<string, 'branch' | 'tag' | null>
13
17
 
14
- /** Cache of resolved tag metadata (message/date/SHA). */
18
+ /**
19
+ * Cache of resolved tag metadata (message/date/SHA).
20
+ */
15
21
  tagInfo: Map<string, TagInfo | null>
16
22
 
17
- /** Cache of resolved tag commit SHAs. */
23
+ /**
24
+ * Cache of resolved tag commit SHAs.
25
+ */
18
26
  tagSha: Map<string, string | null>
19
27
  }
20
28
 
21
- /** Remaining requests available per current rate-limit window. */
29
+ /**
30
+ * Remaining requests available per current rate-limit window.
31
+ */
22
32
  rateLimitRemaining: number
23
33
 
24
- /** GitHub token, if available. */
34
+ /**
35
+ * GitHub token, if available.
36
+ */
25
37
  token: undefined | string
26
38
 
27
- /** Scheduled time when rate limit resets. */
39
+ /**
40
+ * Scheduled time when rate limit resets.
41
+ */
28
42
  rateLimitReset: Date
29
43
 
30
- /** GitHub REST API base URL. */
44
+ /**
45
+ * GitHub REST API base URL.
46
+ */
31
47
  baseUrl: string
32
48
  }
@@ -8,35 +8,51 @@ import { TagInfo } from './tag-info';
8
8
  * normalized, serializable data structures.
9
9
  */
10
10
  export interface GitHubClient {
11
- /** Detect whether a reference is a tag or a branch (or unknown). */
11
+ /**
12
+ * Detect whether a reference is a tag or a branch (or unknown).
13
+ */
12
14
  getRefType(
13
15
  owner: string,
14
16
  repo: string,
15
17
  reference: string,
16
18
  ): Promise<'branch' | 'tag' | null>
17
19
 
18
- /** List releases with minimal enrichment. */
20
+ /**
21
+ * List releases with minimal enrichment.
22
+ */
19
23
  getAllReleases(
20
24
  owner: string,
21
25
  repo: string,
22
26
  limit?: number,
23
27
  ): Promise<ReleaseInfo[]>
24
28
 
25
- /** Fetch tag metadata (message/date) and the resolved commit SHA. */
29
+ /**
30
+ * Fetch tag metadata (message/date) and the resolved commit SHA.
31
+ */
26
32
  getTagInfo(owner: string, repo: string, tag: string): Promise<TagInfo | null>
27
33
 
28
- /** Resolve commit SHA for a tag without fetching commit data. */
34
+ /**
35
+ * Resolve commit SHA for a tag without fetching commit data.
36
+ */
29
37
  getTagSha(owner: string, repo: string, tag: string): Promise<string | null>
30
38
 
31
- /** List repository tags (name + commit SHA). */
39
+ /**
40
+ * List repository tags (name + commit SHA).
41
+ */
32
42
  getAllTags(owner: string, repo: string, limit?: number): Promise<TagInfo[]>
33
43
 
34
- /** Fetch the latest release or null when no latest release exists. */
44
+ /**
45
+ * Fetch the latest release or null when no latest release exists.
46
+ */
35
47
  getLatestRelease(owner: string, repo: string): Promise<ReleaseInfo | null>
36
48
 
37
- /** Current rate limit snapshot. */
49
+ /**
50
+ * Current rate limit snapshot.
51
+ */
38
52
  getRateLimitStatus(): { remaining: number; resetAt: Date }
39
53
 
40
- /** True when remaining requests are below a threshold. */
54
+ /**
55
+ * True when remaining requests are below a threshold.
56
+ */
41
57
  shouldWaitForRateLimit(threshold?: number): boolean
42
58
  }
@@ -1,23 +1,39 @@
1
- /** Normalized release information used across the tool. */
1
+ /**
2
+ * Normalized release information used across the tool.
3
+ */
2
4
  export interface ReleaseInfo {
3
- /** Release description (body) or null when absent. */
5
+ /**
6
+ * Release description (body) or null when absent.
7
+ */
4
8
  description: string | null
5
9
 
6
- /** True when the release is marked as prerelease. */
10
+ /**
11
+ * True when the release is marked as prerelease.
12
+ */
7
13
  isPrerelease: boolean
8
14
 
9
- /** Commit SHA associated with the release tag (may be null). */
15
+ /**
16
+ * Commit SHA associated with the release tag when known (may be provisional).
17
+ */
10
18
  sha: string | null
11
19
 
12
- /** Publication date of the release. */
20
+ /**
21
+ * Publication date of the release.
22
+ */
13
23
  publishedAt: Date
14
24
 
15
- /** Tag name (e.g. V1.2.3). */
25
+ /**
26
+ * Tag name (e.g. V1.2.3).
27
+ */
16
28
  version: string
17
29
 
18
- /** Release name or tag name when name is not provided. */
30
+ /**
31
+ * Release name or tag name when name is not provided.
32
+ */
19
33
  name: string
20
34
 
21
- /** HTML URL of the release page. */
35
+ /**
36
+ * HTML URL of the release page.
37
+ */
22
38
  url: string
23
39
  }
@@ -1,12 +1,20 @@
1
1
  import { GitHubAction } from './github-action';
2
- /** Result of scanning a repository for GitHub Actions usage. */
2
+ /**
3
+ * Result of scanning a repository for GitHub Actions usage.
4
+ */
3
5
  export interface ScanResult {
4
- /** Map of workflow files to their used GitHub Actions. */
6
+ /**
7
+ * Map of workflow files to their used GitHub Actions.
8
+ */
5
9
  workflows: Map<string, GitHubAction[]>
6
10
 
7
- /** Map of composite action names to their file paths. */
11
+ /**
12
+ * Map of composite action names to their file paths.
13
+ */
8
14
  compositeActions: Map<string, string>
9
15
 
10
- /** List of all unique GitHub Actions found in the repository. */
16
+ /**
17
+ * List of all unique GitHub Actions found in the repository.
18
+ */
11
19
  actions: GitHubAction[]
12
20
  }