Skip to content

Commit

Permalink
Merge pull request #11 from dashcamio/michael/private-repo-checkout
Browse files Browse the repository at this point in the history
personal access token as env
  • Loading branch information
orliesaurus authored Mar 20, 2024
2 parents ba64fdb + 6aee627 commit 90022ff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 66 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ jobs:
1. open youtube.
2. find a cat video
3. quit the browser
env:
PERSONAL_GH_TOKEN: ${{ secrets.PERSONAL_GH_TOKEN }}
76 changes: 10 additions & 66 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 @@ -38911,6 +38850,10 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
return match === "\n" ? "\\n" : "\\r\\n";
});

const personalAccessToken = process.env.IS_DEV
? ""
: process.env.PERSONAL_GH_TOKEN;

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

console.log('TestDriver: "Dispatching testdriver..."'.green);
Expand All @@ -38923,6 +38866,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
repo,
branch,
prompt,
personalAccessToken,
},
{
Accept: "application/json",
Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
return match === "\n" ? "\\n" : "\\r\\n";
});

const personalAccessToken = process.env.IS_DEV
? ""
: process.env.PERSONAL_GH_TOKEN;

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

console.log('TestDriver: "Dispatching testdriver..."'.green);
Expand All @@ -50,6 +54,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms));
repo,
branch,
prompt,
personalAccessToken,
},
{
Accept: "application/json",
Expand Down

0 comments on commit 90022ff

Please sign in to comment.