Skip to content

Add --debug flag to display Gmail search URL - #409

Merged
mbrt merged 2 commits into
mbrt:masterfrom
izidormatusov:debug_url
Jul 18, 2024
Merged

Add --debug flag to display Gmail search URL#409
mbrt merged 2 commits into
mbrt:masterfrom
izidormatusov:debug_url

Conversation

@izidormatusov

Copy link
Copy Markdown
Contributor

When creating a complicated search criteria, it can be helpful to verify that it matches the emails. If you specify --debug on diff, apply, edit commands, URL to Gmail search will be displayed in the diff.

Fixes#407

Comment threadcmd/gmailctl/cmd/apply_cmd.go Outdated
Comment threadcmd/gmailctl/cmd/edit_cmd.go Outdated
Comment threadinternal/engine/filter/filter.go Outdated
Comment threadinternal/engine/filter/filter.go Outdated
Comment threadinternal/engine/filter/filter.go
@izidormatusov
izidormatusovforce-pushed the debug_url branch 2 times, most recently from 7998f7d to 0d985deCompareJuly 13, 2024 13:23
@izidormatusov

Copy link
Copy Markdown
ContributorAuthor

I have resolved the comments and added tests. Please have a look again

@mbrtmbrt left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good, thanks! And sorry for the delay in reviewing.

Please fix the lint errors and then we're good to merge.

@izidormatusov

Copy link
Copy Markdown
ContributorAuthor

I have run gofmt -s -w $files, it should be fixed now

@mbrt

mbrt commented Jul 18, 2024

Copy link
Copy Markdown
Owner

Uhm, @izidormatusov it looks like the check still fails. Could you double check?

When creating a complicated search criteria, it can be helpful to verify
that it matches the emails. If you specify `--debug` on diff, apply,
edit commands, URL to Gmail search will be displayed in the diff.
Fixesmbrt#407
@izidormatusov

Copy link
Copy Markdown
ContributorAuthor

Forgot to add the formatted files into the commit 🤦 Should be fixed now

@mbrt

mbrt commented Jul 18, 2024

Copy link
Copy Markdown
Owner

More files need to be fixed. I suggest running go fmt ./... or configuring your editor to do it for you at every save. Note that it looks like internal/graph/munkres.go will be fixed too (I excluded the graph package from lint checks as it's a vendored dependency). You can decide whether to keep that change in the PR or not, up to you.

@codecov

codecovBot commented Jul 18, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 90.90909% with 3 lines in your changes missing coverage. Please review.

Project coverage is 66.55%. Comparing base (313754a) to head (500f202).
Report is 21 commits behind head on master.

Files with missing linesPatch %Lines
internal/engine/filter/filter.go89.47%1 Missing and 1 partial ⚠️
internal/engine/filter/diff.go92.85%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #409 +/- ##
==========================================
+ Coverage 65.67% 66.55% +0.87% 
==========================================
Files 20 20 Lines 2025 2051 +26 ==========================================
+ Hits 1330 1365 +35 + Misses 609 599 -10 - Partials 86 87 +1 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mbrt

mbrt commented Jul 18, 2024

Copy link
Copy Markdown
Owner

Ah, nevermind. I could fix it myself quickly. Thanks for the contribution!

@mbrt
mbrt merged commit 0e164b6 into mbrt:masterJul 18, 2024
@mbrtmbrt added the kind/feature New feature or request label Jan 19, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/featureNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Display URL to test the new rules

2 participants

@izidormatusov@mbrt