Comments (6)
How do you create the Jira
label to be under Inbox
through the Gmail UI? I don't see a way to do it. I also can't create a label called INBOX
through the UI, which matches the behavior of gmailctl.
If it's just a top level label you could just remove the INBOX
part in the config.
from gmailctl.
I just tried using the Gmail UI, though normally I do everything from within my mail client. IMAP doesn't know about "labels", it just knows folders and Gmail translates between the two internally.
In the UI, all subfolders of Inbox
show up with INBOX/
as part of the label. So a Jira
subfolder of Inbox
would show up as INBOX/Jira
.
from gmailctl.
I see. As I suspected, the actual label is INBOX/Jira
(i.e. a label with a slash within). I see a couple of ways forward:
You could manually list your labels like so:
labels: [
{ name: 'INBOX/Jira' },
{ name: 'INBOX/Jira/foo' },
// ...
],
Or if you're currently using lib.rulesLabels(rules)
, you could just modify the library function (in gmailctl.libsonnet
) to ignore the INBOX
prefix or remove the extendWithParents part.
I'm hesitant to modify the behavior of existing functions, unless there's a very good reason as they tend to break existing users. I feel like your particular use case should be easy enough to handle on your side.
from gmailctl.
Generally, I'd agree.
My thought here is that this is a pretty simple case that would be broken for any user wanting to do this already, but also shouldn't impact anyone who doesn't need it.
All that's really needed would be some logic that prevents a plain INBOX
label to show up in the labels
list when using the library function. Like you mentioned earlier, there's no way to create such a label, through the API or through the UI.
It would break for people that rely on this throwing an error, like perhaps in tests? I'm not sure how common that would be.
I changed the library function to do
local flat = std.flattenArrays([extend(l) for l in labels]);
std.filter(function(f) f != 'INBOX', flat),
That seems to do what I'd want
from gmailctl.
Yes, I agree that this seems like it would not be a big breaking change.
One thing to keep in mind is that there are a bunch of special labels, and some are not even documented: https://developers.google.com/gmail/api/guides/labels#types_of_labels. To fix this properly we would have to account for all these cases (and keep them in sync).
In general I feel like it's strange to have label names starting with INBOX/
, so I'm reluctant to complicate things to accommodate this case.
Maybe one more potential way forward is to have a variant of rulesLabels
that doesn't create sub-labels automatically. This seems like a generic enough use case.
from gmailctl.
This issue is stale because it has been open for 30 days without activity.
This will be closed in 7 days, unless you add the 'lifecycle/keep-alive' label or comment.
from gmailctl.
Related Issues (20)
- Is there a particular reason why isEscaped / isRaw cannot be used for cc / bcc? HOT 3
- VSCode Support HOT 2
- Tests fail with realistic inputs HOT 2
- Cant figure it out HOT 1
- Option for `gmailctl download` to "download" a local XML file HOT 2
- Add option to apply all parent labels if `gmailctl` is managing labels HOT 4
- `gmailctl` should interpret `Some/Label/Name` as a nested label HOT 3
- Consider editing repository setings to remove "Packages" section HOT 1
- Progress indicators HOT 4
- Token has been expired or revoked HOT 6
- Following flow for sorting mails possible? HOT 3
- Potential GMail bug causes exporting to XML not working with category action rules, workaround needed HOT 2
- Support diffing with colordiff/delta/etc HOT 4
- Why does gmailctl split this kind of "or" filter into separate rules? HOT 19
- Support `deliveredto` rule HOT 3
- Could libsonnet helper files be situated next to the tmp file for `gmailctl edit` to avoid import path errors? HOT 4
- Is it possible to programatically edit filters with gmailctl? HOT 2
- Expose a public API HOT 2
- automatic quoting of addresses with plus sign should not quote addresses that are already quoted HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmailctl.