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

Suggestion: Choose the container to open with conditions on the URL #2100

Closed
samuelroland opened this issue Aug 11, 2021 · 5 comments
Closed

Comments

@samuelroland
Copy link

Hey,
I really appreciate this extension. Thanks to the authors and contributors ! I have a suggestion.

My problem

I have 2 GH accounts (pro and perso). On container 1 GH is logged with my pro account and on container 2 GH is logged with my perso account.
And I would like to visit GH with container 1 (where my pro account is logged) only when I'm visiting an organization repos to be able to see private repos directly without changing containers by hand. So on the same website depending on the URL, I would like that the container is sometimes 1 or 2.

Potential solution

Can you add condition options with Regex or more user-friendly options (like URL starts with, ends with, contains, and a string)? That would be cool. This feature will be useful for people with several logged account on the same website mostly (and even doing OAuth stuff with several accounts and containers).

Configuration example

For my case I would ideally be able to configure like that:
On github.com, if the URL starts with github.com/mycompany then open container 1. else open container 2.
Or even better with Regex condition: On github.com, if the URL matches github.com/user/laravel- then open in container 2.

Maybe some conditions depending on other things than the URL could be useful, but I don't see use cases them.

@bigpresh
Copy link

I have the exact same use case - I want anything starting https://github.com/example to open in a Work container tab where I'm logged in to my work GH account, and anything else to open in my default container where I'm logged in to my personal account.

This is about the same thing asked for in #2096, #2049, #691, #976, #1064, #959, #1731, #1684, #1629, #1577, and probably others - quite a few duplicate requests for this feature.

https://addons.mozilla.org/en-US/firefox/addon/containerise/ purports to support regex matches so could do this, but I haven't tried it yet. (I'd much, much rather Mozilla incorporate this feature into Multi-Account Containers...)

@samuelroland
Copy link
Author

Hey, @bigpresh thanks for your answer ! I never imagined it was so much asked by other people (my quick search through the issues didn't show me the other issues, because they are formulated differently.).
Thanks for the link of containerise. Unfortunately, I tested it and after 10 minutes I gave up because I don't understand it. That's not intuitive and regex doesn't work really well or just the order of checks is not obvious...

I don't know if the issue should be kept open or closed... ? As you say, I hope someone implement it in a good, intuitive and functionnal way in this extension...

@dsfrederic
Copy link

dsfrederic commented Aug 18, 2021

Hey,
Exact same use case here. Mainly for Azure consultancy work i'll have to switch tenant quite often. It would be useful to have dev.azure.com/CLIENT always open in certain container.

@bigpresh these issues seem to go back a while. So is it correct there's no real solution at this point except for the containerise extension?

@bigpresh
Copy link

@bigpresh these issues seem to go back a while. So is it correct there's no real solution at this point except for the containerise extension?

Indeed, it's clearly a popular request. As far as I'm aware, there's still no way to do it with the Mozilla Multi-Account Containers addon itself.

I have, however, now managed to get it to work with Containerise after a little fiddling... the key seems to be to go into the CSV Editor in Containerise (click the pencil icon) then add e.g.:

!github.com/mycompany , Work
!github.com/orgs/mycompany , Work

(then click the Save icon at the bottom, of course)

I first experimented with the regex support (starting the lines with @) but had no luck - then when I tried the above, it worked fine, and e.g. github.com/mycompany, github.com/mycompany/reponame, github.com/orgs/mycompany/projects/5 etc all open in my Work container, but e.g. github.com, github.com/bigpresh etc open in my default container.

@dannycolin
Copy link
Collaborator

Duplicate of #691

@dannycolin dannycolin marked this as a duplicate of #691 Jun 15, 2022
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

No branches or pull requests

4 participants