-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: generate autocomplete spec for fig
- Loading branch information
Showing
7 changed files
with
122 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Fig integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- cli-command-help | ||
|
||
jobs: | ||
push-autocomplete-spec: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- name: Install Dependencies | ||
run: npm ci | ||
- run: npm run generate-autocomplete-spec | ||
working-directory: packages/cli | ||
|
||
- name: Generate token | ||
id: generate_token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.GH_APP_ID }} | ||
private_key: ${{ secrets.GH_PRIVATE_KEY }} | ||
|
||
- name: Create Autocomplete PR | ||
uses: withfig/push-to-fig-autocomplete-action@v1 | ||
with: | ||
token: ${{ steps.generate_token.outputs.token }} | ||
autocomplete-spec-name: barnard59 | ||
spec-path: packages/cli/fig-spec.js | ||
integration: commander |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ node_modules | |
*.js.map | ||
.env | ||
*.received.txt | ||
fig-spec.js |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { generateCompletionSpec } from '@fig/complete-commander' | ||
import cli from '../lib/cli.js' | ||
|
||
(async () => { | ||
const { program } = await cli() | ||
process.stdout.write(await generateCompletionSpec(program)) | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters