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

fix: github comment edit #137

Merged
merged 2 commits into from
Oct 18, 2023
Merged

Conversation

Udit-takkar
Copy link
Contributor

Summary

Fixes: #17

What does this PR do?
If a comment is created using linear then if it is edited on github then the changes are also reflected on linear.

One way we can get the ID of comment to be updated on linear is to store it in github Footer comment when it is created on linear.

Screenshot 2023-10-12 at 2 12 51 AM

Test Plan

Screen.Recording.2023-10-12.at.2.10.05.AM.mov

Related Issues

#17
Which issue does this PR resolve?

@Udit-takkar
Copy link
Contributor Author

@tedspare any better ideas to get the comment Id ?

pages/api/utils.ts Outdated Show resolved Hide resolved
pages/api/utils.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@tedspare tedspare left a comment

Choose a reason for hiding this comment

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

Awesome work @Udit-takkar! 🙌 🚀

If it works, LGTM

As for storing the Linear comment ID in the footer of a comment, the only downside I see is the reference could be broken by a user manually removing the footer.

An alternative would be to map all Linear <> GitHub comment IDs in a new table. At our scale, there are 10k+ issues mapped, so there could be 100k+ comments.

Happy to merge this!

@Udit-takkar Udit-takkar marked this pull request as ready for review October 16, 2023 17:36
@Udit-takkar
Copy link
Contributor Author

Udit-takkar commented Oct 16, 2023

@tedspare okay 👌. Addressed all the comments.

As for storing the Linear comment ID in the footer of a comment, the only downside I see is the reference could be broken by a user manually removing the footer.

Yes that's why I marked this PR as draft first.

@tedspare tedspare merged commit a76e6a6 into calcom:main Oct 18, 2023
1 check passed
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.

Edit and delete comments
2 participants