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

Support Gmail's "forward" action (for forwarding emails) #58

Closed
wants to merge 1 commit into from

Conversation

slix
Copy link
Contributor

@slix slix commented Apr 22, 2019

Fixes #56

Example:

$ gmailctl diff
--- Current
+++ TO BE APPLIED
@@ -1,14 +1,21 @@
 * Criteria:
     from: rapidrewards@luv.southwest.com
-    subject: "rapid rewards report"
+    subject: "Rapid Rewards Report"
   Actions:
     archive
     forward to: redacted@AwardWallet.com

 * Criteria:
     from: mymileageplus@news.united.com
-    subject: "your monthly statement"
+    subject: "MileagePlus Statement"
   Actions:
     archive
     forward to: redacted@AwardWallet.com

+* Criteria:
+    from: mymileageplus@news.united.com
+    subject: "Your monthly statement"
+  Actions:
+    archive
+    forward to: redacted@AwardWallet.com
+
Do you want to apply them? [y/N]: y
Applying the changes...
$ 

One of my in-Gmail filters was matched exactly, so it doesn't show in the diff.

Gmail now shows 4 filters that have a forward:

Matches: from:(rapidrewards@luv.southwest.com) subject:("Rapid Rewards Report")
Do this: Skip Inbox, Forward to redacted@AwardWallet.com

Matches: from:(mymileageplus@news.united.com) subject:("MileagePlus Statement")
Do this: Skip Inbox, Forward to redacted@AwardWallet.com

Matches: from:(mymileageplus@news.united.com) subject:("Your monthly statement")
Do this: Skip Inbox, Forward to redacted@AwardWallet.com

Matches: from:(DeltaAirLines@e.delta.com) subject:("SkyMiles STATEMENT")
Do this: Skip Inbox, Forward to redacted@AwardWallet.com

Copy link
Contributor Author

@slix slix left a comment

Choose a reason for hiding this comment

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

I forgot to add forward to the README docs.

@mbrt
Copy link
Owner

mbrt commented Apr 23, 2019

Thanks for doing this!

On a first glance everything looks good. A few things to ask:

  • Could you please open the PR against the branch cfg_alpha3 instead of master? I'm going to merge another config change in there, so I can do a single config migration, and then merge everything in master and bump the version.
  • Please take a look at the failing integration tests. I know they are a bit fragile but they should be fixed before merging.
  • Please add at least one config with forwarding rules in the integration tests as well.

@mbrt
Copy link
Owner

mbrt commented May 1, 2019

I have included the changes you made to the config file in master, but not your actual implementation. When you are ready you just need to resolve the conflicts and add 1-2 tests and this is good to go (to master directly). No config file change is necessary!

mbrt added a commit that referenced this pull request Jan 15, 2020
I had to move things around since the code changed quite a bit.
I also have to fix the tests.
@mbrt mbrt mentioned this pull request Jan 15, 2020
@mbrt
Copy link
Owner

mbrt commented Jan 15, 2020

I have rebased these changes and fixed the tests as well in #75.
Thanks @slix for taking it up to this point!

@mbrt mbrt closed this Jan 15, 2020
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.

Add "forward" action (to forward emails)
2 participants