Skip to content

Commit

Permalink
Updating error trapping and API call for copilot add user
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjozwiak committed Jan 17, 2024
1 parent a6a6024 commit 4cbc718
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22402,7 +22402,7 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
if (!input.deployUsersDryRun) {
core.info(`Assigning ${user.login} a Copilot seat in ${user.organization}`);
try {
yield octokit.request(`POST /orgs/{org}/copilot/billing/selected_users`, {
yield octokit.request(`POST /orgs/${user.organization}/copilot/billing/selected_users`, {
selected_usernames: [`${user.login}`]
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ const run = async (): Promise<void> => {
if (!input.deployUsersDryRun) {
core.info(`Assigning ${user.login} a Copilot seat in ${user.organization}`);
try {

Check failure on line 421 in src/index.ts

View workflow job for this annotation

GitHub Actions / build

Unnecessary try/catch wrapper
await octokit.request(`POST /orgs/{org}/copilot/billing/selected_users`, {
await octokit.request(`POST /orgs/${user.organization}/copilot/billing/selected_users`, {
selected_usernames: [`${user.login}`]
});
} catch (error) {
Expand Down

0 comments on commit 4cbc718

Please sign in to comment.