1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

Updated addon feature links for browserrouter

This commit is contained in:
Christopher Kolstad 2021-05-07 14:05:42 +02:00
parent 5330126a2e
commit 13af1cf9ab
9 changed files with 10 additions and 22 deletions

View File

@ -8,10 +8,10 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1
'{"text":"%%% \\n some@user.com created feature toggle [some-toggle](http://some-url.com/#/features/strategies/some-toggle)\\n**Enabled**: no | **Type**: undefined | **Project**: undefined\\n**Activation strategies**: ```- name: default\\n``` \\n %%% ","title":"Unleash notification update"}'
'{"text":"%%% \\n some@user.com created feature toggle [some-toggle](http://some-url.com/features/strategies/some-toggle)\\n**Enabled**: no | **Type**: undefined | **Project**: undefined\\n**Activation strategies**: ```- name: default\\n``` \\n %%% ","title":"Unleash notification update"}'
## Should call datadog webhook for archived toggle
> Snapshot 1
'{"text":"%%% \\n The feature toggle *[some-toggle](http://some-url.com/#/archive/strategies/some-toggle)* was *archived* by some@user.com. \\n %%% ","title":"Unleash notification update"}'
'{"text":"%%% \\n The feature toggle *[some-toggle](http://some-url.com/archive/strategies/some-toggle)* was *archived* by some@user.com. \\n %%% ","title":"Unleash notification update"}'

View File

@ -8,10 +8,10 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1
'{"username":"Unleash","icon_emoji":":unleash:","text":"some@user.com created feature toggle <http://some-url.com/#/features/strategies/some-toggle|some-toggle>\\n*Enabled*: no | *Type*: undefined | *Project*: undefined\\n*Activation strategies*: ```- name: default\\n```","channel":"#undefined","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/#/features/strategies/some-toggle"}]}]}'
'{"username":"Unleash","icon_emoji":":unleash:","text":"some@user.com created feature toggle <http://some-url.com/features/strategies/some-toggle|some-toggle>\\n*Enabled*: no | *Type*: undefined | *Project*: undefined\\n*Activation strategies*: ```- name: default\\n```","channel":"#undefined","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/features/strategies/some-toggle"}]}]}'
## Should call slack webhook for archived toggle
> Snapshot 1
'{"username":"Unleash","icon_emoji":":unleash:","text":"The feature toggle *<http://some-url.com/#/archive/strategies/some-toggle|some-toggle>* was *archived* by some@user.com.","channel":"#undefined","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/#/archive/strategies/some-toggle"}]}]}'
'{"username":"Unleash","icon_emoji":":unleash:","text":"The feature toggle *<http://some-url.com/archive/strategies/some-toggle|some-toggle>* was *archived* by some@user.com.","channel":"#undefined","attachments":[{"actions":[{"name":"featureToggle","text":"Open in Unleash","type":"button","value":"featureToggle","style":"primary","url":"http://some-url.com/archive/strategies/some-toggle"}]}]}'

View File

@ -4,26 +4,14 @@ The actual snapshot is saved in `teams.test.js.snap`.
Generated by [AVA](https://avajs.dev).
## Should call slack webhook
> Snapshot 1
'{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"Feature toggle some-toggle | *Type*: undefined | *Project*: undefined <br /> *Activation strategies*: \\n- name: default\\n","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"some@user.com"},{"name":"Action","value":"Create"},{"name":"Enabled","value":"*no*"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/#/features/strategies/some-toggle"}]}]}'
## Should call slack webhook for archived toggle
> Snapshot 1
'{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"The feature toggle *some-toggle* was *archived*","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"some@user.com"},{"name":"Action","value":"feature-archived"},{"name":"Enabled","value":"*no*"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/#/archive/strategies/some-toggle"}]}]}'
## Should call teams webhook
> Snapshot 1
'{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"Feature toggle some-toggle | *Type*: undefined | *Project*: undefined <br /> *Activation strategies*: \\n- name: default\\n","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"some@user.com"},{"name":"Action","value":"Create"},{"name":"Enabled","value":"*no*"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/#/features/strategies/some-toggle"}]}]}'
'{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"Feature toggle some-toggle | *Type*: undefined | *Project*: undefined <br /> *Activation strategies*: \\n- name: default\\n","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"some@user.com"},{"name":"Action","value":"Create"},{"name":"Enabled","value":"*no*"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/features/strategies/some-toggle"}]}]}'
## Should call teams webhook for archived toggle
> Snapshot 1
'{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"The feature toggle *some-toggle* was *archived*","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"some@user.com"},{"name":"Action","value":"feature-archived"},{"name":"Enabled","value":"*no*"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/#/archive/strategies/some-toggle"}]}]}'
'{"themeColor":"0076D7","summary":"Message","sections":[{"activityTitle":"The feature toggle *some-toggle* was *archived*","activitySubtitle":"Unleash notification update","facts":[{"name":"User","value":"some@user.com"},{"name":"Action","value":"feature-archived"},{"name":"Enabled","value":"*no*"}]}],"potentialAction":[{"@type":"OpenUri","name":"Go to feature","targets":[{"os":"default","uri":"http://some-url.com/archive/strategies/some-toggle"}]}]}'

View File

@ -60,7 +60,7 @@ class DatadogAddon extends Addon {
featureLink(event) {
const path = event.type === FEATURE_ARCHIVED ? 'archive' : 'features';
return `${this.unleashUrl}/#/${path}/strategies/${event.data.name}`;
return `${this.unleashUrl}/${path}/strategies/${event.data.name}`;
}
generateStaleText(event) {
@ -69,7 +69,7 @@ class DatadogAddon extends Addon {
const feature = `[${data.name}](${this.featureLink(event)})`;
if (isStale) {
return `The feature toggle *${feature}* is now *ready to be removed* from the code.
return `The feature toggle *${feature}* is now *ready to be removed* from the code.
This was changed by ${createdBy}.`;
}
return `The feature toggle *${feature}* was *unmarked as stale* by ${createdBy}.`;

View File

@ -91,7 +91,7 @@ class JiraAddon extends Addon {
{
type: 'link',
attrs: {
href: `${this.unleashUrl}/#/features/strategies/${featureName}`,
href: `${this.unleashUrl}/features/strategies/${featureName}`,
title: 'Visit Unleash Admin UI',
},
},

View File

@ -84,7 +84,7 @@ class TeamsAddon extends Addon {
featureLink(event) {
const path = event.type === FEATURE_ARCHIVED ? 'archive' : 'features';
return `${this.unleashUrl}/#/${path}/strategies/${event.data.name}`;
return `${this.unleashUrl}/${path}/strategies/${event.data.name}`;
}
generateStaleText(event) {