Shared TypeScript definitions for Octokit projects
Installations
npm install @octokit/types
Developer
Developer Guide
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Yes
Node Version
22.11.0
NPM Version
10.5.2
Statistics
136 Stars
640 Commits
32 Forks
6 Watching
9 Branches
25 Contributors
Updated on 28 Nov 2024
Languages
TypeScript (98.21%)
JavaScript (1.79%)
Total Downloads
Cumulative downloads
Total Downloads
2,135,176,042
Last day
-10.9%
3,207,043
Compared to previous day
Last week
3.8%
19,797,960
Compared to previous week
Last month
7.5%
80,528,495
Compared to previous month
Last year
33.1%
751,902,918
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
types.ts
Shared TypeScript definitions for Octokit projects
Usage
See all exported types at https://octokit.github.io/types.ts
Examples
Get parameter and response data types for a REST API endpoint
1import { Endpoints } from "@octokit/types"; 2 3type listUserReposParameters = 4 Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; 5type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; 6 7async function listRepos( 8 options: listUserReposParameters, 9): listUserReposResponse["data"] { 10 // ... 11}
Get response types from endpoint methods
1import { 2 GetResponseTypeFromEndpointMethod, 3 GetResponseDataTypeFromEndpointMethod, 4} from "@octokit/types"; 5import { Octokit } from "@octokit/rest"; 6 7const octokit = new Octokit(); 8type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< 9 typeof octokit.issues.createLabel 10>; 11type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< 12 typeof octokit.issues.createLabel 13>;
Contributing
See CONTRIBUTING.md
License
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
all changesets reviewed
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
packaging workflow detected
Details
- Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:17
Reason
SAST tool is run on all commits
Details
- Info: SAST configuration detected: CodeQL
- Info: all commits (30) are checked with a SAST tool
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy
- Info: Found text in security policy: SECURITY.md:1
Reason
8 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 8
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/add_to_octokit_project.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/add_to_octokit_project.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/codeql.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/codeql.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/codeql.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/immediate-response.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/immediate-response.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-notification.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/release-notification.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-notification.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/release-notification.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/release.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/update.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/update.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/octokit/types.ts/update.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/update.yml:18
- Info: 4 out of 11 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 5 third-party GitHubAction dependencies pinned
- Info: 3 out of 4 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/add_to_octokit_project.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:13
- Warn: topLevel 'security-events' permission set to 'write': .github/workflows/codeql.yml:14
- Info: topLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:12
- Warn: no topLevel permission defined: .github/workflows/release-notification.yml:1
- Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:11
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Warn: no topLevel permission defined: .github/workflows/update.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
7.2
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More