|
1 | | -import { getBooleanInput, getInput, info, setOutput } from "@actions/core"; |
| 1 | +import { getBooleanInput, getInput, info, setOutput, summary } from "@actions/core"; |
2 | 2 | import { getOctokit } from "@actions/github"; |
3 | 3 | import { CopilotUsageResponse } from "./types"; |
4 | 4 | import { DefaultArtifactClient } from "@actions/artifact"; |
5 | 5 | import { writeFileSync } from "fs"; |
6 | | -import { createJobSummarySeatAssignments, createJobSummarySeatInfo, createJobSummaryUsage } from "./job.summary"; |
| 6 | +import { createJobSummaryFooter, createJobSummarySeatAssignments, createJobSummarySeatInfo, createJobSummaryUsage } from "./job.summary"; |
7 | 7 | import { createCSV } from "./csv"; |
8 | 8 | import { Json2CsvOptions } from "json-2-csv"; |
9 | 9 | import { debug } from "console"; |
@@ -112,22 +112,20 @@ const run = async (): Promise<void> => { |
112 | 112 | org: input.organization |
113 | 113 | }); |
114 | 114 | if (orgSeatInfo?.data) { |
115 | | - createJobSummarySeatInfo(orgSeatInfo.data); |
| 115 | + await createJobSummarySeatInfo(orgSeatInfo.data); |
116 | 116 | } |
117 | 117 |
|
118 | 118 | info(`Fetching Copilot seat assignments for organization ${input.organization}`); |
119 | 119 | const orgSeatAssignments = await octokit.rest.copilot.listCopilotSeats({ |
120 | 120 | org: input.organization |
121 | 121 | }); |
122 | 122 | if (orgSeatAssignments?.data.seats) { |
123 | | - createJobSummarySeatAssignments(orgSeatAssignments.data); |
| 123 | + await createJobSummarySeatAssignments(orgSeatAssignments.data); |
124 | 124 | } |
125 | 125 | } |
126 | 126 |
|
127 | 127 | if (input.organization) { |
128 | | - // summary |
129 | | - // .addLink(`Manage Access for ${input.organization}`, `https://github.com/organizations/${input.organization}/settings/copilot/seat_management`) |
130 | | - // .write() |
| 128 | + await createJobSummaryFooter(input.organization); |
131 | 129 | } |
132 | 130 | } |
133 | 131 |
|
|
0 commit comments