feat: add linear service#261
Conversation
|
Hi @eryue0220 🥇 Thanks for the work on this PR. The Linear integration is useful and the API key node path looks close to mergeable. I’d like a few OAuth fixes before we land it. 🚀 Could you please address these? 👑
Overall I’m happy with the direction 🙏 OAuth should either be corrected here or moved to a follow-up PR so the API key node can land cleanly. ⭐️ |
Thanks for your review, I've updated. |
|
Thanks for the quick turnaround on this. The scope delimiter, the client close in the credential test path, and the docs cleanup all look good. I also appreciate you adding refresh-path coverage. There is one important OAuth item that still needs another pass before we land this PR. Linear's token endpoint requires form-encoded bodies, not JSON. Their OAuth docs say the token request parameters must be sent as a URL-encoded form submission with Content-Type: application/x-www-form-urlencoded. The latest change switched both the callback and the refresh request from data={...} to json={...}. That makes the body and header consistent, but in the wrong format. Refresh will still fail when a token expires, and the callback path is now regressed too, since it was previously using a fresh client with data={...}. Could you please update both token endpoint calls to use form encoding?
Please also flip the tests accordingly. The current refresh and callback tests assert json is used and data is not, which locks in the wrong behavior. They should assert the form-encoded body, the form content type, and that refreshed tokens are persisted back to the credential. Everything else looks good. Once the token requests are form-encoded and the tests verify that behavior, I think the Linear integration is ready to land as one complete PR. |
Updated. |
mbakgun
left a comment
There was a problem hiding this comment.
I think we can merge this since this is gonna be included in #next version :)
We'll fix it locally , thank you so much for this amazing work !
We'll also fix (duplicated 083 alembic version)
` ^^^^^^^^^^^^^^^^^^^^^^^^
File "asyncpg/protocol/protocol.pyx", line 205, in bind_execute
asyncpg.exceptions.InvalidTextRepresentationError: invalid input value for enum credential_type: "linear"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/mbakgun/Projects/heym/heymrun/backend/.venv/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context
self.dialect.do_execute`
Thanks for your updated. |

This pr is to add new linear service and e2e node.