Skip to content

Commit

Permalink
os param
Browse files Browse the repository at this point in the history
  • Loading branch information
tpikachu committed Mar 13, 2024
1 parent ba64fdb commit eba1dad
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 68 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ jobs:
1. open youtube.
2. find a cat video
3. quit the browser
os: windows
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ inputs:
3. Search for "Rick Astley"
4. Click on the first video
required: true
os:
description: The operating system to use, mac or windows, will be windows by default

outputs:
summary:
Expand Down
79 changes: 12 additions & 67 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3563,7 +3563,7 @@ __export(dist_src_exports, {
module.exports = __toCommonJS(dist_src_exports);

// pkg/dist-src/version.js
var VERSION = "9.2.0";
var VERSION = "9.1.5";

// pkg/dist-src/normalize-paginated-list-response.js
function normalizePaginatedListResponse(response) {
Expand Down Expand Up @@ -3724,8 +3724,6 @@ var paginatingEndpoints = [
"GET /orgs/{org}/members/{username}/codespaces",
"GET /orgs/{org}/migrations",
"GET /orgs/{org}/migrations/{migration_id}/repositories",
"GET /orgs/{org}/organization-roles/{role_id}/teams",
"GET /orgs/{org}/organization-roles/{role_id}/users",
"GET /orgs/{org}/outside_collaborators",
"GET /orgs/{org}/packages",
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
Expand Down Expand Up @@ -3962,7 +3960,7 @@ __export(dist_src_exports, {
module.exports = __toCommonJS(dist_src_exports);

// pkg/dist-src/version.js
var VERSION = "10.4.0";
var VERSION = "10.2.0";

// pkg/dist-src/generated/endpoints.js
var Endpoints = {
Expand Down Expand Up @@ -4089,9 +4087,6 @@ var Endpoints = {
"GET /repos/{owner}/{repo}/actions/permissions/selected-actions"
],
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
getCustomOidcSubClaimForRepo: [
"GET /repos/{owner}/{repo}/actions/oidc/customization/sub"
],
getEnvironmentPublicKey: [
"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"
],
Expand Down Expand Up @@ -4244,9 +4239,6 @@ var Endpoints = {
setCustomLabelsForSelfHostedRunnerForRepo: [
"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
],
setCustomOidcSubClaimForRepo: [
"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"
],
setGithubActionsDefaultWorkflowPermissionsOrganization: [
"PUT /orgs/{org}/actions/permissions/workflow"
],
Expand Down Expand Up @@ -4316,7 +4308,6 @@ var Endpoints = {
listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"],
markNotificationsAsRead: ["PUT /notifications"],
markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"],
markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"],
markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"],
setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"],
setThreadSubscription: [
Expand Down Expand Up @@ -4593,10 +4584,10 @@ var Endpoints = {
updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"]
},
copilot: {
addCopilotSeatsForTeams: [
addCopilotForBusinessSeatsForTeams: [
"POST /orgs/{org}/copilot/billing/selected_teams"
],
addCopilotSeatsForUsers: [
addCopilotForBusinessSeatsForUsers: [
"POST /orgs/{org}/copilot/billing/selected_users"
],
cancelCopilotSeatAssignmentForTeams: [
Expand Down Expand Up @@ -4909,24 +4900,10 @@ var Endpoints = {
}
]
},
oidc: {
getOidcCustomSubTemplateForOrg: [
"GET /orgs/{org}/actions/oidc/customization/sub"
],
updateOidcCustomSubTemplateForOrg: [
"PUT /orgs/{org}/actions/oidc/customization/sub"
]
},
orgs: {
addSecurityManagerTeam: [
"PUT /orgs/{org}/security-managers/teams/{team_slug}"
],
assignTeamToOrgRole: [
"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"
],
assignUserToOrgRole: [
"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"
],
blockUser: ["PUT /orgs/{org}/blocks/{username}"],
cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"],
checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
Expand All @@ -4935,7 +4912,6 @@ var Endpoints = {
convertMemberToOutsideCollaborator: [
"PUT /orgs/{org}/outside_collaborators/{username}"
],
createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"],
createInvitation: ["POST /orgs/{org}/invitations"],
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
createOrUpdateCustomPropertiesValuesForRepos: [
Expand All @@ -4946,9 +4922,6 @@ var Endpoints = {
],
createWebhook: ["POST /orgs/{org}/hooks"],
delete: ["DELETE /orgs/{org}"],
deleteCustomOrganizationRole: [
"DELETE /orgs/{org}/organization-roles/{role_id}"
],
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
enableOrDisableSecurityProductOnAllOrgRepos: [
"POST /orgs/{org}/{security_product}/{enablement}"
Expand All @@ -4960,7 +4933,6 @@ var Endpoints = {
],
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"],
getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"],
getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"],
getWebhookDelivery: [
Expand All @@ -4976,12 +4948,6 @@ var Endpoints = {
listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
listMembers: ["GET /orgs/{org}/members"],
listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"],
listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"],
listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"],
listOrgRoles: ["GET /orgs/{org}/organization-roles"],
listOrganizationFineGrainedPermissions: [
"GET /orgs/{org}/organization-fine-grained-permissions"
],
listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"],
listPatGrantRepositories: [
"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"
Expand All @@ -4996,9 +4962,6 @@ var Endpoints = {
listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"],
listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"],
listWebhooks: ["GET /orgs/{org}/hooks"],
patchCustomOrganizationRole: [
"PATCH /orgs/{org}/organization-roles/{role_id}"
],
pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"],
redeliverWebhookDelivery: [
"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"
Expand All @@ -5023,18 +4986,6 @@ var Endpoints = {
reviewPatGrantRequestsInBulk: [
"POST /orgs/{org}/personal-access-token-requests"
],
revokeAllOrgRolesTeam: [
"DELETE /orgs/{org}/organization-roles/teams/{team_slug}"
],
revokeAllOrgRolesUser: [
"DELETE /orgs/{org}/organization-roles/users/{username}"
],
revokeOrgRoleTeam: [
"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"
],
revokeOrgRoleUser: [
"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"
],
setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
setPublicMembershipForAuthenticatedUser: [
"PUT /orgs/{org}/public_members/{username}"
Expand Down Expand Up @@ -5325,9 +5276,6 @@ var Endpoints = {
{},
{ mapToData: "users" }
],
cancelPagesDeployment: [
"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"
],
checkAutomatedSecurityFixes: [
"GET /repos/{owner}/{repo}/automated-security-fixes"
],
Expand Down Expand Up @@ -5363,15 +5311,12 @@ var Endpoints = {
createForAuthenticatedUser: ["POST /user/repos"],
createFork: ["POST /repos/{owner}/{repo}/forks"],
createInOrg: ["POST /orgs/{org}/repos"],
createOrUpdateCustomPropertiesValues: [
"PATCH /repos/{owner}/{repo}/properties/values"
],
createOrUpdateEnvironment: [
"PUT /repos/{owner}/{repo}/environments/{environment_name}"
],
createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
createOrgRuleset: ["POST /orgs/{org}/rulesets"],
createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"],
createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployment"],
createPagesSite: ["POST /repos/{owner}/{repo}/pages"],
createRelease: ["POST /repos/{owner}/{repo}/releases"],
createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"],
Expand Down Expand Up @@ -5524,9 +5469,6 @@ var Endpoints = {
getOrgRulesets: ["GET /orgs/{org}/rulesets"],
getPages: ["GET /repos/{owner}/{repo}/pages"],
getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],
getPagesDeployment: [
"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"
],
getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"],
getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"],
getPullRequestReviewProtection: [
Expand Down Expand Up @@ -5737,9 +5679,6 @@ var Endpoints = {
]
},
securityAdvisories: {
createFork: [
"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
],
createPrivateVulnerabilityReport: [
"POST /repos/{owner}/{repo}/security-advisories/reports"
],
Expand Down Expand Up @@ -32576,6 +32515,7 @@ class Config {
constructor() {
this.input = {
prompt: core.getInput("prompt"),
os: core.getInput("os") || "mac",
};

// the values of github.context.repo.owner and github.context.repo.repo are taken from
Expand Down Expand Up @@ -38911,7 +38851,9 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
return match === "\n" ? "\\n" : "\\r\\n";
});

console.log("inputs", { repo, branch, prompt });
let os = process.env.IS_DEV ? "mac" : config.input.os;

console.log("inputs", { repo, branch, prompt, os });

console.log('TestDriver: "Dispatching testdriver..."'.green);

Expand All @@ -38923,6 +38865,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
repo,
branch,
prompt,
os,
},
{
Accept: "application/json",
Expand Down Expand Up @@ -39033,6 +38976,8 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
console.log('TestDriver: "FAIL"'.red);
}

console.log("share link before extraction", shareLink);

let extractedFromMarkdown = extractLink(shareLink);

if (extractedFromMarkdown) {
Expand Down
1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Config {
constructor() {
this.input = {
prompt: core.getInput("prompt"),
os: core.getInput("os") || "mac",
};

// the values of github.context.repo.owner and github.context.repo.repo are taken from
Expand Down
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
return match === "\n" ? "\\n" : "\\r\\n";
});

console.log("inputs", { repo, branch, prompt });
let os = process.env.IS_DEV ? "mac" : config.input.os;

console.log("inputs", { repo, branch, prompt, os });

console.log('TestDriver: "Dispatching testdriver..."'.green);

Expand All @@ -50,6 +52,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
repo,
branch,
prompt,
os,
},
{
Accept: "application/json",
Expand Down Expand Up @@ -160,6 +163,8 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
console.log('TestDriver: "FAIL"'.red);
}

console.log("share link before extraction", shareLink);

let extractedFromMarkdown = extractLink(shareLink);

if (extractedFromMarkdown) {
Expand Down

0 comments on commit eba1dad

Please sign in to comment.