Skip to content

Commit

Permalink
WEB3-49: Add workflow to find or create Linear issue from PR (#182)
Browse files Browse the repository at this point in the history
Simmilar to in other repos, this PR adds a GitHub Actions workflow to
find or create a Linear issue when a PR is created

I managed to find the UUID for the "In Progress" state on the Web3 team
using the following API query:

```sh
curl \-X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: ${LINEAR_API_KEY:?}" \
  --data '{ "query": "{ workflowStates { nodes { id name type team { name } } } }" }' \
  https://api.linear.app/graphql | jq
```

---------

Co-authored-by: Wolfgang Welz <[email protected]>
  • Loading branch information
nategraf and Wollac authored Aug 7, 2024
1 parent 0d02cc9 commit bb0dceb
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/linear.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Find or Create Linear Issue for PR

on:
workflow_dispatch:
pull_request:
branches:
- main
types: ["opened", "edited", "reopened", "synchronize"]

permissions:
pull-requests: write
repository-projects: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false

jobs:
create-linear-issue-pr:
runs-on: ubuntu-latest
steps:
- name: Find or create a Linear Issue
uses: risc0/action-find-or-create-linear-issue@risc0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
linear-api-key: ${{ secrets.LINEAR_API_KEY }}
linear-team-key: "WEB3"
linear-created-issue-state-id: "2505ebd6-1fbe-4b25-b2a8-792dfaa50ad9" # in progress

0 comments on commit bb0dceb

Please sign in to comment.