-
Couldn't load subscription status.
- Fork 114
Add action typing #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add action typing #250
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Check Action Typing | ||
|
|
||
| on: | ||
| - pull_request | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| check_action_typing: | ||
| name: Check Action Typing | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Check Action Typing | ||
| uses: typesafegithub/github-actions-typing@0dc5690c35c564d354dc0c23c56559f0813ed3ac | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,321 @@ | ||
| # See https://github.com/typesafegithub/github-actions-typing | ||
| inputs: | ||
| app-id: | ||
| type: string | ||
|
|
||
| private-key: | ||
| type: string | ||
|
|
||
| owner: | ||
| type: string | ||
|
|
||
| repositories: | ||
| type: list | ||
| separator: "\n" | ||
| list-item: | ||
| type: string | ||
|
|
||
| skip-token-revoke: | ||
| type: boolean | ||
|
|
||
| github-api-url: | ||
| type: string | ||
|
|
||
| # <START GENERATED PERMISSIONS TYPES> | ||
| permission-actions: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-administration: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-checks: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-codespaces: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-contents: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-dependabot-secrets: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-deployments: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-email-addresses: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-environments: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-followers: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-git-ssh-keys: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-gpg-keys: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-interaction-limits: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-issues: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-members: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-metadata: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-administration: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-announcement-banners: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-copilot-seat-management: | ||
| type: enum | ||
| allowed-values: | ||
| - "write" | ||
|
|
||
| permission-organization-custom-org-roles: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-custom-properties: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
| - "admin" | ||
|
|
||
| permission-organization-custom-roles: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-events: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
|
|
||
| permission-organization-hooks: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-packages: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-personal-access-token-requests: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-personal-access-tokens: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-plan: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
|
|
||
| permission-organization-projects: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
| - "admin" | ||
|
|
||
| permission-organization-secrets: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-self-hosted-runners: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-organization-user-blocking: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-packages: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-pages: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-profile: | ||
| type: enum | ||
| allowed-values: | ||
| - "write" | ||
|
|
||
| permission-pull-requests: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-repository-custom-properties: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-repository-hooks: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-repository-projects: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
| - "admin" | ||
|
|
||
| permission-secret-scanning-alerts: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-secrets: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-security-events: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-single-file: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-starring: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-statuses: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-team-discussions: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-vulnerability-alerts: | ||
| type: enum | ||
| allowed-values: | ||
| - "read" | ||
| - "write" | ||
|
|
||
| permission-workflows: | ||
| type: enum | ||
| allowed-values: | ||
| - "write" | ||
|
|
||
| # <END GENERATED PERMISSIONS TYPES> | ||
|
|
||
| outputs: | ||
| token: | ||
| type: string | ||
|
|
||
| installation-id: | ||
| type: integer | ||
|
|
||
| app-slug: | ||
| type: string |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -30,13 +30,36 @@ const permissionsInputs = Object.entries(appPermissionsSchema.properties) | |||||
| description: "${description}"`; | ||||||
| }, ""); | ||||||
|
|
||||||
| const actionsYamlContent = await readFile("action.yml", "utf8"); | ||||||
| const actionYamlContent = await readFile("action.yml", "utf8"); | ||||||
|
|
||||||
| // In the action.yml file, replace the content between the `<START GENERATED PERMISSIONS INPUTS>` and `<END GENERATED PERMISSIONS INPUTS>` comments with the new content | ||||||
| const updatedActionsYamlContent = actionsYamlContent.replace( | ||||||
| const updatedActionYamlContent = actionYamlContent.replace( | ||||||
| /(?<=# <START GENERATED PERMISSIONS INPUTS>)(.|\n)*(?=# <END GENERATED PERMISSIONS INPUTS>)/, | ||||||
|
||||||
| /(?<=# <START GENERATED PERMISSIONS INPUTS>)(.|\n)*(?=# <END GENERATED PERMISSIONS INPUTS>)/, | |
| PERMISSIONS_INPUTS_REGEX, |
Uh oh!
There was an error while loading. Please reload this page.