Skip to content

jamesacklin/linear-app-create-issue-action

This branch is 19 commits ahead of korosuke613/linear-app-create-issue-action:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e5b4934 · Jul 26, 2023

History

91 Commits
Jul 6, 2021
Jun 12, 2023
Jun 12, 2023
May 16, 2021
May 17, 2021
May 16, 2021
May 16, 2021
May 16, 2021
Jun 9, 2023
Jul 26, 2023
Jun 12, 2023
Jun 9, 2023
Jun 9, 2023
May 16, 2021
May 16, 2021

Repository files navigation

linear-app-create-issue-action

GitHub Action to create an Issue for Linear.app.

Usage

Input

See action.yml

arg description required type
issueTitle Title of issue yes string
issueContent Issue markdown yes string
apiKey API key for Linear.app (ref) yes string
teamId Team ID for Linear.app (ref) yes string
stateId State ID for Linear.app (ref) yes string

Usage

Create Workflow

Create a workflow .yml file in your repositories .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.

name: Add issues to project

on:
  issues:
    types:
      - opened

jobs:
  add-to-linear:
    name: Add issue to Linear
    runs-on: ubuntu-latest
    steps:
      - uses: jamesacklin/linear-app-create-issue-action@v2
        with:
          issueTitle: ${{ github.event.issue.title }}
          issueContent: ${{ github.event.issue.body }}
          apiKey: ${{ secrets.LINEAR_APIKEY }}
          teamId: ${{ secrets.LINEAR_TEAMID }}
          stateId: ${{ secrets.LINEAR_STATEID }}

FAQ

How do I get teamId and stateId?

Call the Linear API. An example is shown below using jq.

teamId

input

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: <Replace this with your Linear API Key>" \
  --data '{ "query": "{ teams { nodes { id name } } }" }' \
  https://api.linear.app/graphql | jq

stateId

input

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: <Replace this with your Linear API Key>" \
  --data '{ "query": "{ workflowStates { nodes { id name type } } }" }' \
  https://api.linear.app/graphql | jq

License

The scripts and documentation in this project are released under the MIT License

About

GitHub Action to create an Issue for Linear.app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 88.1%
  • JavaScript 11.9%