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

feat: enable internal workspace reporting #437

Merged
merged 36 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
317ca32
feat: add rum api calls to shared
alinarublea Dec 13, 2023
2ce1404
feat: merge main changes
alinarublea Jan 22, 2024
5c2390e
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jan 24, 2024
641f735
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jan 24, 2024
c9fc3d1
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jan 29, 2024
f007a5f
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jan 29, 2024
f09c2f6
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jan 30, 2024
966d79d
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Feb 6, 2024
6136548
chore: merge main
alinarublea Feb 12, 2024
d7918e3
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Feb 13, 2024
78baaae
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Feb 26, 2024
cac54f9
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Feb 26, 2024
3a34590
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Feb 27, 2024
6073613
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Feb 27, 2024
ad0bb8b
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Feb 28, 2024
81204ae
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Mar 1, 2024
2594513
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Mar 1, 2024
f81d056
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Mar 19, 2024
5354fc8
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Apr 23, 2024
aaae74c
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea May 30, 2024
305a0a0
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jun 21, 2024
4eb43c3
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jul 9, 2024
835366c
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jul 15, 2024
f68704f
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jul 22, 2024
8371649
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Jul 22, 2024
a1dac87
fix: naming
alinarublea Jul 24, 2024
39f0a8d
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Aug 28, 2024
8dc69f6
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Sep 12, 2024
d6b853f
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Oct 1, 2024
3299821
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Oct 10, 2024
6c7c883
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Oct 28, 2024
abbab5c
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Nov 7, 2024
3f27400
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Nov 11, 2024
904b1cc
Merge branch 'main' of github.com:adobe/spacecat-shared
alinarublea Nov 12, 2024
77d5ccb
feat: use slack channel workspace
alinarublea Nov 12, 2024
64507f6
feat: use slack channel workspace
alinarublea Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const Config = (data = {}) => {
const state = { ...validConfig };
const self = { state };
self.getSlackConfig = () => state.slack;
self.isInternalCustomer = () => state?.slack?.workspace === 'internal';
self.getSlackMentions = (type) => state?.handlers?.[type]?.mentions?.slack;
self.getHandlerConfig = (type) => state?.handlers?.[type];
self.getHandlers = () => state.handlers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('Config Tests', () => {
const dynamoItem = {
slack: {
channel: 'channel1',
workspace: 'workspace1',
workspace: 'internal',
},
handlers: {
404: {
Expand All @@ -160,8 +160,10 @@ describe('Config Tests', () => {
const config = Config.fromDynamoItem(dynamoItem);
const slackMentions = config.getSlackMentions(404);
const slackConfig = config.getSlackConfig();
const isInternal = config.isInternalCustomer();
expect(slackConfig.channel).to.equal('channel1');
expect(slackConfig.workspace).to.equal('workspace1');
expect(slackConfig.workspace).to.equal('internal');
expect(isInternal).to.equal(true);
expect(slackMentions[0]).to.equal('id1');
});
});
Expand All @@ -171,7 +173,7 @@ describe('Config Tests', () => {
const data = Config({
slack: {
channel: 'channel1',
workspace: 'workspace1',
workspace: 'external',
},
handlers: {
404: {
Expand All @@ -183,7 +185,8 @@ describe('Config Tests', () => {
const slackConfig = dynamoItem.slack;
const slackMentions = dynamoItem.handlers[404].mentions.slack;
expect(slackConfig.channel).to.equal('channel1');
expect(slackConfig.workspace).to.equal('workspace1');
alinarublea marked this conversation as resolved.
Show resolved Hide resolved
expect(slackConfig.workspace).to.equal('external');
expect(data.isInternalCustomer()).to.equal(false);
expect(slackMentions[0]).to.equal('id1');
});
});
Expand Down
Loading