@@ -8,6 +8,16 @@ import { getEnvValue } from './rewire'
88/**
99 * GITHUB_API_URL environment variable.
1010 * GitHub API URL (e.g., https://api.github.com).
11+ *
12+ * @returns The GitHub API URL, or `undefined` if not set
13+ *
14+ * @example
15+ * ```typescript
16+ * import { getGithubApiUrl } from '@socketsecurity/lib/env/github'
17+ *
18+ * const apiUrl = getGithubApiUrl()
19+ * // e.g. 'https://api.github.com' or undefined
20+ * ```
1121 */
1222/*@__NO_SIDE_EFFECTS__ */
1323export function getGithubApiUrl ( ) : string | undefined {
@@ -17,6 +27,16 @@ export function getGithubApiUrl(): string | undefined {
1727/**
1828 * GITHUB_BASE_REF environment variable.
1929 * GitHub pull request base branch.
30+ *
31+ * @returns The pull request base branch name, or `undefined` if not set
32+ *
33+ * @example
34+ * ```typescript
35+ * import { getGithubBaseRef } from '@socketsecurity/lib/env/github'
36+ *
37+ * const baseRef = getGithubBaseRef()
38+ * // e.g. 'main' or undefined
39+ * ```
2040 */
2141/*@__NO_SIDE_EFFECTS__ */
2242export function getGithubBaseRef ( ) : string | undefined {
@@ -26,6 +46,16 @@ export function getGithubBaseRef(): string | undefined {
2646/**
2747 * GITHUB_REF_NAME environment variable.
2848 * GitHub branch or tag name.
49+ *
50+ * @returns The branch or tag name, or `undefined` if not set
51+ *
52+ * @example
53+ * ```typescript
54+ * import { getGithubRefName } from '@socketsecurity/lib/env/github'
55+ *
56+ * const refName = getGithubRefName()
57+ * // e.g. 'feature/my-branch' or 'v1.0.0'
58+ * ```
2959 */
3060/*@__NO_SIDE_EFFECTS__ */
3161export function getGithubRefName ( ) : string | undefined {
@@ -35,6 +65,16 @@ export function getGithubRefName(): string | undefined {
3565/**
3666 * GITHUB_REF_TYPE environment variable.
3767 * GitHub ref type (branch or tag).
68+ *
69+ * @returns The ref type ('branch' or 'tag'), or `undefined` if not set
70+ *
71+ * @example
72+ * ```typescript
73+ * import { getGithubRefType } from '@socketsecurity/lib/env/github'
74+ *
75+ * const refType = getGithubRefType()
76+ * // e.g. 'branch' or 'tag'
77+ * ```
3878 */
3979/*@__NO_SIDE_EFFECTS__ */
4080export function getGithubRefType ( ) : string | undefined {
@@ -44,6 +84,16 @@ export function getGithubRefType(): string | undefined {
4484/**
4585 * GITHUB_REPOSITORY environment variable.
4686 * GitHub repository name in owner/repo format.
87+ *
88+ * @returns The repository name, or `undefined` if not set
89+ *
90+ * @example
91+ * ```typescript
92+ * import { getGithubRepository } from '@socketsecurity/lib/env/github'
93+ *
94+ * const repo = getGithubRepository()
95+ * // e.g. 'SocketDev/socket-cli' or undefined
96+ * ```
4797 */
4898/*@__NO_SIDE_EFFECTS__ */
4999export function getGithubRepository ( ) : string | undefined {
@@ -53,6 +103,16 @@ export function getGithubRepository(): string | undefined {
53103/**
54104 * GITHUB_SERVER_URL environment variable.
55105 * GitHub server URL (e.g., https://github.com).
106+ *
107+ * @returns The GitHub server URL, or `undefined` if not set
108+ *
109+ * @example
110+ * ```typescript
111+ * import { getGithubServerUrl } from '@socketsecurity/lib/env/github'
112+ *
113+ * const serverUrl = getGithubServerUrl()
114+ * // e.g. 'https://github.com' or undefined
115+ * ```
56116 */
57117/*@__NO_SIDE_EFFECTS__ */
58118export function getGithubServerUrl ( ) : string | undefined {
@@ -62,6 +122,16 @@ export function getGithubServerUrl(): string | undefined {
62122/**
63123 * GITHUB_TOKEN environment variable.
64124 * GitHub authentication token for API access.
125+ *
126+ * @returns The GitHub token, or `undefined` if not set
127+ *
128+ * @example
129+ * ```typescript
130+ * import { getGithubToken } from '@socketsecurity/lib/env/github'
131+ *
132+ * const token = getGithubToken()
133+ * // e.g. 'ghp_abc123...' or undefined
134+ * ```
65135 */
66136/*@__NO_SIDE_EFFECTS__ */
67137export function getGithubToken ( ) : string | undefined {
@@ -71,6 +141,16 @@ export function getGithubToken(): string | undefined {
71141/**
72142 * GH_TOKEN environment variable.
73143 * Alternative GitHub authentication token for API access (used by GitHub CLI).
144+ *
145+ * @returns The GH CLI token, or `undefined` if not set
146+ *
147+ * @example
148+ * ```typescript
149+ * import { getGhToken } from '@socketsecurity/lib/env/github'
150+ *
151+ * const token = getGhToken()
152+ * // e.g. 'gho_abc123...' or undefined
153+ * ```
74154 */
75155/*@__NO_SIDE_EFFECTS__ */
76156export function getGhToken ( ) : string | undefined {
0 commit comments