Skip to content

shilman/linear-action

Repository files navigation

typescript-action status

Linear action

An action that creates Linear issues from Github issues when they are labeled linear. This is useful when you are aggregating issues across multiple Github organizations, or when you are running an open-source project where the Github issues and activity is public, but you want to plan your work privately.

Using the action

In your git repository, create a file .github/workflows/linear.yml with the following contents:

# .github/workflows/linear.yml

name: Export to linear

on:
  issues:
    types: [labeled]
  pull_request:
    types: [labeled]

jobs:
  trigger:
    if: github.event.label.name == 'linear'
    name: Export to linear
    runs-on: ubuntu-latest
    steps:
      - name: Linear action
        uses: shilman/linear-action@v1
        with:
          ghIssueNumber: ${{ github.event.issue.number }}
          ghRepoName: ${{ github.event.repository.name }}
          ghToken: ${{ secrets.LINEAR_GH_TOKEN }}
          linearIssuePrefix: SB # See below
          linearLabel: Storybook # see below
          linearPRLabel: PR # see below
          linearTeam: CH # See below
          linearApiKey: ${{ secrets.LINEAR_API_KEY }}

Developing the action

$ npm install
$ npm run build && npm run package
$ npm test

Publish to a distribution branch

Actions are run from GitHub repos so we will checkin the packed dist folder.

Then run ncc and push the results:

$ npm run package
$ git add dist
$ git commit -a -m "prod dependencies"
$ git push origin releases/v1

Note: We recommend using the --license option for ncc, which will create a license file for all of the production node modules used in your project.

Your action is now published! 🚀

See the versioning documentation

See the actions tab for runs of this action! 🚀

Usage:

After testing you can create a v1 tag to reference the stable and latest V1 action

About

Export github issues to linear when they are labeled

Resources

License

Stars

Watchers

Forks

Packages

No packages published