-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔨 Add GitHub action for Linear sync #1433
Conversation
- name: Create Linear Issue | ||
uses: actions/github-script@v7 | ||
env: | ||
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a repository secret.
issues: | ||
types: [opened, reopened] | ||
pull_request: | ||
types: [opened, reopened] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a PR/issue is opened
const response = await fetch('https://api.linear.app/graphql', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Authorization': process.env.LINEAR_API_KEY | ||
}, | ||
body: JSON.stringify({ | ||
query, | ||
variables | ||
}) | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes our API call to the Linear API with the inputs above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Changes
This adds a GitHub workflow to sync Issue/PR opens to Linear so that we can manage those more easily.
Secrets are in the repo already for API calls.