Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1914 from LEGO/feature/msteams
Feature/msteams
- Loading branch information
Showing
18 changed files
with
3,180 additions
and
4,408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 9 additions & 11 deletions
20
plugins/microsoft-teams/__tests__/__snapshots__/index.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`createPost should add more indents to nested lists - 2 spaces 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\\\n • Another note\\"}"`; | ||
exports[`createPost should add more indents to nested lists - 2 spaces 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n- PR [some link](google.com)//n - Another note\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`createPost should add more indents to nested lists 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\\\n • Another note\\"}"`; | ||
exports[`createPost should add more indents to nested lists 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n- PR [some link](google.com)//n - Another note\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`createPost should add title 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`createPost should add title 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n- PR [some link](google.com)\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`createPost should call slack api 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`createPost should call Microsoft Office Teams api 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n- PR [some link](google.com)\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`createPost should call slack api in env var 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`createPost should call Microsoft Office Teams api in env var 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n- PR [some link](google.com)\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`createPost should call slack api through http proxy 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`createPost should call Microsoft Office Teams api through http proxy 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n- PR [some link](google.com)\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`createPost should call slack api through https proxy 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`createPost should call Microsoft Office Teams api through https proxy 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n- PR [some link](google.com)\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`createPost should call slack api with custom atTarget 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@here: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`createPost should call Microsoft Office Teams api with minimal config 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n- PR [some link](google.com)\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`createPost should call slack api with minimal config 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
|
||
exports[`createPost should remove markdown code types from block 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n\`json\`:\\\\n\\\\n\`\`\`\\\\n{ \\\\\\"foo\\\\\\": \\\\\\"bar\\\\\\" }\`\`\`\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`createPost should remove markdown code types from block 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"# My Notes//n\`\`\`json//n{ /\\"foo/\\": /\\"bar/\\" }\`\`\`//n- PR [some link](google.com)\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; |
4 changes: 2 additions & 2 deletions
4
plugins/microsoft-teams/__tests__/__snapshots__/microsoft-teams.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`postToMicrosoftTeams should call microsoft-teams api through http proxy 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`postToMicrosoftTeams should call microsoft-teams api through http proxy 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"*My Notes*\\\\n• PR <google.com|some link>\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; | ||
|
||
exports[`postToMicrosoftTeams should call microsoft-teams api with minimal config 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"@channel: New release *<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\\\n*My Notes*\\\\n• PR <google.com|some link>\\"}"`; | ||
exports[`postToMicrosoftTeams should call microsoft-teams api with minimal config 1`] = `"{\\"@context\\":\\"http://schema.org/extensions\\",\\"@type\\":\\"MessageCard\\",\\"text\\":\\"*My Notes*\\\\n• PR <google.com|some link>\\",\\"potentialAction\\":[{\\"@type\\":\\"OpenUri\\",\\"name\\":\\"Learn More\\",\\"targets\\":[{\\"os\\":\\"default\\",\\"uri\\":\\"*<https://git.hub/some/project/releases/v1.0.0|v1.0.0>*\\"}]}]}"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
require("mock-fs"); | ||
|
||
jest.mock('requireg', () => require); | ||
jest.mock('requireg', () => require); |
Oops, something went wrong.