Skip to content

Add context option for filter diffs - #421

Merged
mbrt merged 1 commit into
mbrt:masterfrom
kpengboy:diff-context
Jan 19, 2025
Merged

mbrt merged 1 commit into
mbrt:masterfrom
kpengboy:diff-context

Conversation

@kpengboy

Copy link
Copy Markdown
Contributor

This adds a --context option to the diff subcommand and a --diff-context option to the apply and edit commands. The option allows the number of lines of diff context to be customized, which is helpful for verifying the correctness of changes to more complex filters.

@codecov

codecov Bot commented Jan 18, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 31.81818% with 15 lines in your changes missing coverage. Please review.

Project coverage is 54.52%. Comparing base (c566f95) to head (7dd5035).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
cmd/gmailctl/cmd/apply_cmd.go 0.00% 5 Missing ⚠️
cmd/gmailctl/cmd/diff_cmd.go 0.00% 5 Missing ⚠️
cmd/gmailctl/cmd/edit_cmd.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #421      +/-   ##
==========================================
- Coverage   54.63%   54.52%   -0.12%     
==========================================
  Files          53       53              
  Lines        4448     4457       +9     
==========================================
  Hits         2430     2430              
- Misses       1877     1886       +9     
  Partials      141      141              

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

@mbrt mbrt 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.

Great stuff, left only minor comments, thanks!

Comment thread cmd/gmailctl/cmd/apply_cmd.go Outdated
Comment thread cmd/gmailctl/cmd/apply_cmd.go Outdated
Comment thread cmd/gmailctl/cmd/diff_cmd.go Outdated
Comment thread cmd/gmailctl/cmd/diff_cmd.go Outdated
Comment thread cmd/gmailctl/cmd/edit_cmd.go Outdated
Comment thread cmd/gmailctl/cmd/edit_cmd.go Outdated
This adds a `--context` option to the `diff` subcommand and a `--diff-context` option to the `apply` and `edit` commands. The option allows the number of lines of diff context to be customized, which is helpful for verifying the correctness of changes to more complex filters.
@kpengboy
kpengboy requested a review from mbrt January 19, 2025 04:27
@mbrt
mbrt merged commit 6b9e153 into mbrt:master Jan 19, 2025
@mbrt mbrt added the kind/feature New feature or request label Jan 19, 2025
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
gmailctl 0.12.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
### New features
* Add `--debug` flag to display Gmail search URL by @izidormatusov in mbrt/gmailctl#409
* Add context option for filter diffs by @kpengboy in mbrt/gmailctl#421
### Maintenance and bug fixing
* Update README.md - 'of' -> 'or' by @ChrisCarini in mbrt/gmailctl#369
* typo; `togheter` -> `together` by @ChrisCarini in mbrt/gmailctl#370
* fix typos by @RayBB in mbrt/gmailctl#380
* Move tmp files for edit command next to config file. by @mbrt in mbrt/gmailctl#386
* Skip quoting if args are already quoted. by @mbrt in mbrt/gmailctl#391
* Make init message less confusing by @mbrt in mbrt/gmailctl#394
* Configure Renovate by @renovate[bot] in mbrt/gmailctl#397
* Update min go version to 1.21 by @mbrt in mbrt/gmailctl#403
* fix missing close file in edit command by @testwill in mbrt/gmailctl#404
* Onboard to codecov by @mbrt in mbrt/gmailctl#406
* Bump golang.org/x/crypto from 0.29.0 to 0.31.0 by @dependabot[bot] in mbrt/gmailctl#418
* Fix initialization of cfgDir by @kpengboy in mbrt/gmailctl#422
* Allowing to specify a port for OAuth server by @kipelovets in mbrt/gmailctl#430
* Colorize diff output by @kpengboy in mbrt/gmailctl#423
* Fix code scanning alert: Workflow does not contain permissions by @mbrt in mbrt/gmailctl#439
* feat (warning): Improve details of any invalid filters found by @jafin in mbrt/gmailctl#440
* Update README with Windows editor configuration by @jafin in mbrt/gmailctl#441
* task(workflow): Replace matrix build with GoReleaser for releases by @gene1wood in mbrt/gmailctl#450
* Add category PURCHASES by @mbrt in mbrt/gmailctl#453

## New Contributors
* @ChrisCarini made their first contribution in mbrt/gmailctl#369
* @RayBB made their first contribution in mbrt/gmailctl#380
* @renovate[bot] made their first contribution in mbrt/gmailctl#397
* @testwill made their first contribution in mbrt/gmailctl#404
* @izidormatusov made their first contribution in mbrt/gmailctl#409
* @kpengboy made their first contribution in mbrt/gmailctl#422
* @kipelovets made their first contribution in mbrt/gmailctl#430
* @jafin made their first contribution in mbrt/gmailctl#440
* @gene1wood made their first contribution in mbrt/gmailctl#450

**Full Changelog**: https://github.com/mbrt/gmailctl/compare/v0.10.7...v0.12.0</pre>
  <p>View the full release notes at <a href="https://github.com/mbrt/gmailctl/releases/tag/v0.12.0">https://github.com/mbrt/gmailctl/releases/tag/v0.12.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!3726
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants