You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: ensuring org user has its own setup configured (#482)
* fix: ensuring org user has its own setup configured
* fix: removing unused auth access token from env
* chore: promoting single env var usage for ci tokens
* chore: token provision now accepts either orgId or previousToken
* chore: removing back auth/user-setup feature-flags
Copy file name to clipboardExpand all lines: README.md
+9-12Lines changed: 9 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -357,32 +357,31 @@ hd auth login
357
357
hd auth provision-ci-token
358
358
```
359
359
360
-
Copy the token output, add as CI secrets: `HD_AUTH_TOKEN` and `HD_ORG_ID` (orgId is obtained from user setup and stored at provision time when using locally).
360
+
Copy the token output, add as CI secret: `HD_CI_CREDENTIAL`
361
361
362
-
**CI pipeline (headless):** Run `hd scan eol` directly with `HD_AUTH_TOKEN` and `HD_ORG_ID` set. The CLI exchanges the token for an access token automatically:
362
+
**CI pipeline (headless):** Run `hd scan eol` directly with `HD_CI_CREDENTIAL` set. The CLI exchanges the token for an access token automatically:
363
363
364
364
```bash
365
-
exportHD_ORG_ID=<id> HD_AUTH_TOKEN="<token>"
365
+
exportHD_CI_CREDENTIAL="<token>"
366
366
hd scan eol --dir .
367
367
```
368
368
369
369
| Secret / Env Var | Purpose |
370
370
|------------------|---------|
371
-
|`HD_AUTH_TOKEN`| Long-lived refresh token from provision |
372
-
|`HD_ORG_ID`| Organization ID (required when using HD_AUTH_TOKEN; also stored at provision time when using local file) |
371
+
|`HD_CI_CREDENTIAL`| Refresh token from provision; exchanged for access token |
373
372
374
373
#### Local testing
375
374
376
375
Reproduce the CI flow locally:
377
376
378
377
```bash
379
-
exportHD_ORG_ID=1234 HD_AUTH_TOKEN="eyJ..."
378
+
exportHD_CI_CREDENTIAL="<token-from-provision>"
380
379
hd scan eol --dir /path/to/project
381
380
```
382
381
383
382
#### GitHub Actions (authenticated scan)
384
383
385
-
Add secrets `HD_AUTH_TOKEN` and `HD_ORG_ID` in your repository or organization, then:
384
+
Add secret `HD_CI_CREDENTIAL` in your repository or organization, then:
386
385
387
386
```yaml
388
387
- uses: actions/checkout@v5
@@ -391,21 +390,19 @@ Add secrets `HD_AUTH_TOKEN` and `HD_ORG_ID` in your repository or organization,
391
390
node-version: '24'
392
391
- name: Run EOL Scan
393
392
env:
394
-
HD_ORG_ID: ${{ secrets.HD_ORG_ID }}
395
-
HD_AUTH_TOKEN: ${{ secrets.HD_AUTH_TOKEN }}
393
+
HD_CI_CREDENTIAL: ${{ secrets.HD_CI_CREDENTIAL }}
396
394
run: npx @herodevs/cli@beta scan eol -s
397
395
```
398
396
399
397
#### GitLab CI (authenticated scan)
400
398
401
-
Add CI/CD variables `HD_AUTH_TOKEN` and `HD_ORG_ID` (masked) in your project:
399
+
Add CI/CD variable `HD_CI_CREDENTIAL` (masked) in your project:
"CI token is invalid or expired. To provision a new CI token, run 'hd auth provision-ci-token' (after logging in with 'hd auth login').";
11
10
12
-
constCI_ORG_ID_ERROR_MESSAGE=
13
-
'Organization ID is required for CI token. When using HD_AUTH_TOKEN, set HD_ORG_ID to your organization ID (e.g. HD_ORG_ID=123). When using a locally stored CI token, re-provision with: hd auth provision-ci-token';
14
-
15
11
exportclassCITokenErrorextendsError{
16
12
readonlycode: CITokenErrorCode;
17
13
@@ -23,25 +19,14 @@ export class CITokenError extends Error {
0 commit comments