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

Skip GitLab MR reply comments #536

Merged
merged 8 commits into from Oct 31, 2022
Merged

Skip GitLab MR reply comments #536

merged 8 commits into from Oct 31, 2022

Conversation

Half-Shot
Copy link
Contributor

GitLab uses discussion_id to chain together replies. We can't really tell what position we are in the thread, so we just have to assume that if we've not seen the discussion before that we are the first note, and subsequent notes are child notes.

This also changes the code so that we skip sending a notice into the room if the user has disabled comment-only notices.

@Half-Shot Half-Shot requested a review from a team as a code owner October 17, 2022 09:04
@Half-Shot Half-Shot changed the title Skip MR reply comments Skip GitLab MR reply comments Oct 17, 2022
Copy link
Contributor

@jaller94 jaller94 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I'm a bit surprised that Hookshot depends on @alloc/quick-lru instead of the upstream quick-lru (which became an ESM in version 6).

src/Connections/GitlabRepo.ts Outdated Show resolved Hide resolved
src/Connections/GitlabRepo.ts Outdated Show resolved Hide resolved
src/Connections/GitlabRepo.ts Outdated Show resolved Hide resolved
Half-Shot and others added 3 commits October 31, 2022 14:56
Co-authored-by: Christian Paul <christianp@matrix.org>
Co-authored-by: Christian Paul <christianp@matrix.org>
Co-authored-by: Christian Paul <christianp@matrix.org>
@Half-Shot
Copy link
Contributor Author

I'm a bit surprised that Hookshot depends on @alloc/quick-lru instead of the upstream quick-lru (which became an ESM in version 6).

We can't use ESM, as it introduces a bunch of annoying incompatibilities. Instead of trying to refactor the entire project to be ESM compatible, we've settled for just using a cJS library for the moment.

@Half-Shot Half-Shot enabled auto-merge (squash) October 31, 2022 15:05
@Half-Shot Half-Shot merged commit ecbd7e6 into main Oct 31, 2022
@Half-Shot Half-Shot deleted the hs/filter-gitlab-comments branch October 31, 2022 16:06
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.

None yet

2 participants