Skip to content

Commit 3aae61d

Browse files
authored
feat(finicky): add personal URL handling and refactor match logic (#250)
1 parent 9e888dd commit 3aae61d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

finicky/finicky.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ const workUrls = [
4242
"www.cursor.com",
4343
];
4444

45+
const peronalUrls = ["github.com"];
46+
4547
const workOrgUrls = {
4648
"admin.atlassian.com": [
4749
"907bakbd-da41-19ab-k502-2c857bj2kd6b",
@@ -57,7 +59,6 @@ const workOrgUrls = {
5759
"dashboard.heroku.com": "/botpress-internal/",
5860
"depot.dev": "w8z3zskrwb",
5961
"dnsimple.com": "/78774/",
60-
"github.com": "/botpress/",
6162
"grafana.com": "botpress",
6263
"groups.google.com": "botpress.com",
6364
"huggingface.co": "/botpress-hq/",
@@ -116,6 +117,18 @@ const workUrl = ({ url }) => {
116117
return false;
117118
};
118119

120+
const personalUrl = ({ url }) => {
121+
if (url.username === "personal") {
122+
return true;
123+
}
124+
125+
if (peronalUrls.includes(url.host)) {
126+
return true;
127+
}
128+
129+
return false;
130+
};
131+
119132
export default {
120133
defaultBrowser,
121134
options: {
@@ -124,7 +137,7 @@ export default {
124137
},
125138
handlers: [
126139
{
127-
match: ({ url }) => url.username === "personal",
140+
match: ({ url }) => personalUrl({ url }),
128141
browser: defaultBrowser,
129142
},
130143
{

0 commit comments

Comments
 (0)