Skip to content
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

Merged
merged 2 commits into from
Jan 19, 2025
Merged

🔨 Add GitHub action for Linear sync #1433

merged 2 commits into from
Jan 19, 2025

Conversation

mcncl
Copy link
Contributor

@mcncl mcncl commented Jan 16, 2025

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.

@mcncl mcncl enabled auto-merge January 16, 2025 04:47
- name: Create Linear Issue
uses: actions/github-script@v7
env:
LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }}
Copy link
Contributor Author

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.

Comment on lines +4 to +7
issues:
types: [opened, reopened]
pull_request:
types: [opened, reopened]
Copy link
Contributor Author

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

Comment on lines +55 to +65
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
})
});
Copy link
Contributor Author

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

Copy link

@lizrabuya lizrabuya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@mcncl mcncl merged commit 9965c10 into main Jan 19, 2025
1 check passed
@mcncl mcncl deleted the bm/linear_action branch January 19, 2025 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants