-
Notifications
You must be signed in to change notification settings - Fork 72
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
gmailctl should not try to create "INBOX" label #300
Comments
How do you create the If it's just a top level label you could just remove the |
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 |
I see. As I suspected, the actual label is You could manually list your labels like so:
Or if you're currently using 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. |
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. I changed the library function to do
That seems to do what I'd want |
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 Maybe one more potential way forward is to have a variant of |
This issue is stale because it has been open for 30 days without activity. |
I have a filter rule that sets the label
INBOX/Jira/<Project>
. When fetching emails via IMAP, this creates a folder hierarchy likeInbox
->Jira
-><Project>
.When using automatic management of labels with gmailctl, gmailctl tries to create the labels:
INBOX
,INBOX/Jira
andINBOX/Jira/<Project>
. However, the API complains thatINBOX
isn't a valid label:IMHO it shoud just skip that label, since it doesn't need to be created. For now the only way (that I can see) to work around it would be to manually list the labels, or at the very least, manually create the "toplevel" labels first.
The text was updated successfully, but these errors were encountered: