Code Monkey home page Code Monkey logo

push-to-fig-autocomplete-action's Introduction

typescript-action status

Usage

name: 'Publish version'
on:
  push:
    tags:        
      - 'v*'
  workflow_dispatch:

jobs:
  push-to-fig-autocomplete:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v2
      - name: Generate the spec
        run:
          ## Execute commands to generate the spec through some official or third party integration
      - name: Create Autocomplete PR
          ## Create the autocomplete PR using this action
        uses: withfig/publish-to-fig-autocomplete@v1
        with:
          token: ${{ secrets.YOUR_PAT_HERE }}
          autocomplete-spec-name: generated-spec
          spec-path: path/to/generated-spec.ts
          integration: commander
  ## Other jobs not related to the spec update

Supported Inputs

  • token: a GitHub personal access token with repo scope (default: GITHUB_TOKEN)
  • autocomplete-spec-name (required): the name of the spec in the autocomplete repo in the form [scope/]name where name is the spec filename in the autocomplete repo. Examples:
    • if the spec relative path in the autocomplete repo is src/npm.ts, then autocomplete-spec-name is npm
    • if the spec relative path in the autocomplete repo is src/@withfig/autocomplete-tools.ts, then autocomplete-spec-name is @withfig/autocomplete-tools
  • spec-path (required): the path of the generated spec in the current repo
  • integration: the name of the official Fig integration used See. Supported values: "commander" | "oclif" | "cobra" | "clap" | "swift-argument-parser" | "click" | "cement" | "argparse"
  • pr-body: set a custom PR body description

We also provide support for third party autocomplete repos via the following inputs:

  • repo-org: name of the organization/user that stores the third party autocomplete repository (default: withfig)
  • repo-name: name of the third party autocomplete repository (default: autocomplete)
  • diff-based-versioning: use new diff-based versioning (default: false) (requires: new-spec-version to be set if diff-based-versioning is true)
  • new-spec-version: the new spec version (only required when using diff-based-versioning)
  • use-minor-base: create a new version file per each minor version (only used with diff-based-versioning) (default: false)

NOTE: third party autocomplete repos must be structured as the official autocomplete one. Run npx @withfig/autocomplete-tools@latest init to generate one.

push-to-fig-autocomplete-action's People

Contributors

dependabot[bot] avatar fedeci avatar mschrage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

push-to-fig-autocomplete-action's Issues

Avoid timeout between commit and PR creation

Currently we add a small delay between the commit and the PR creation because otherwise GitHub is not able to see changes between the base branch and the head, we should avoid this tweak.

Embed ESlint directly in the action

ESLint actually cannot be bundled correctly because when specifying a configuration it does not import modules such as parsers/plugins... directly but through require.resolve and bundlers are not able to correctly resolve those.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.