set assignee #14
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
name: Create Linear Issue on Pull Request | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
types: [opened, reopened] | |
jobs: | |
create-linear-issue-on-pull-request: | |
runs-on: ubuntu-latest | |
name: A test job | |
steps: | |
# To use this repository's private action, | |
# you must check out the repository | |
- name: Checkout action repo | |
uses: actions/checkout@v3 | |
- name: Create the Linear Issue | |
id: createIssue | |
uses: ./ # Uses an action in the root directory | |
with: | |
linear-api-key: ${{secrets.LINEAR_API_KEY}} | |
linear-team-key: "CHR" | |
linear-issue-title: ${{github.event.pull_request.title}} | |
linear-issue-description: ${{github.event.pull_request.body}} | |
linear-issue-state-id: "d8dc0111-0862-4ea9-8eb5-e7c127f847ce" # Done | |
linear-attachment-url: ${{github.event.pull_request.html_url}} | |
linear-attachment-title: ${{github.event.pull_request.title}} | |
linear-issue-label-ids: "ea7fc863-71f7-409c-bcda-b42a22dc9a75,7c8d0d42-b53c-49c4-ba23-b48f6e14eb62,77c37057-9bd9-413b-a8b8-5aabd7c1a557" | |
author-email: ${{ github.event.pull_request.user.email }} | |
- name: Create comment in PR with Linear Issue link | |
if: steps.fc.outputs.comment-id == '' | |
uses: peter-evans/create-or-update-comment@v2 | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
${{ steps.createIssue.outputs.linear-issue-url }} |