-
Notifications
You must be signed in to change notification settings - Fork 0
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 #6 from getappmap/feat/markdown-report
feat: Add support for writing a GitHub Action summary
- Loading branch information
Showing
19 changed files
with
15,593 additions
and
2,670 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
node_modules | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.DS_Store | ||
|
||
# Temporary build output | ||
build | ||
|
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,4 @@ | ||
dist/ | ||
lib/ | ||
node_modules/ | ||
node_modules/ | ||
**/*.hbs |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,159 @@ | ||
# AppMap | ||
|
||
| Summary | Status | | ||
| --- | --- | | ||
| [Test failures](#test-failures) | {{#if testFailures.length}}:warning: {{testFailures.length}} failed{{/if}}{{#unless testFailures.length}}:white_check_mark: All tests passed{{/unless}} | | ||
| [API changes](#api-changes) | | ||
{{~#unless apiDiff.differenceCount }} | ||
:white_check_mark: No API changes | ||
{{~/unless}} | ||
{{~#if apiDiff.differenceCount }} | ||
{{~#if apiDiff.breakingDifferencesFound }}:warning:{{/if~}} | ||
{{~#unless apiDiff.breakingDifferencesFound }}:wrench:{{/unless~}} | ||
{{apiDiff.differenceCount}} | ||
{{~#if apiDiff.breakingDifferencesFound }} breaking {{/if~}} | ||
{{~#unless apiDiff.breakingDifferencesFound }} compatible {{/unless~}} | ||
changes | ||
{{~/if}} | ||
| | ||
| [Changed AppMaps](#changed-appmaps) | | ||
{{~#unless changedAppMaps.length }} | ||
:white_check_mark: No changes | ||
{{~/unless}} | ||
{{~#if changedAppMaps.length }} | ||
:wrench: {{changedAppMaps.length}} changes | ||
{{~/if}} | ||
| | ||
| [Changed Code Behavior](#changed-code-behavior) | | ||
{{~#unless sequenceDiagramDiffSnippetCount }} | ||
:white_check_mark: No changes | ||
{{~/unless}} | ||
{{~#if sequenceDiagramDiffSnippetCount }} | ||
:wrench: {{sequenceDiagramDiffSnippetCount}} changes | ||
{{~/if}} | ||
| | ||
|
||
## Test failures | ||
|
||
{{#each testFailures}} | ||
|
||
<details> | ||
<summary> | ||
{{testLocation}} | ||
</summary> | ||
|
||
<table> | ||
<tbody> | ||
<tr> | ||
<td>Test case file</td> | ||
<td><a href="{{testPath}}">{{testLocation}}</a></td> | ||
</tr> | ||
{{#if changedAppMap}} | ||
{{#with changedAppMap}} | ||
<tr> | ||
<td>Sequence diagram diff</td> | ||
<td> | ||
<a href="./{{sequenceDiagramDiff}}">{{sequenceDiagramDiff}}</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Source diff</td> | ||
<td> | ||
|
||
```diff | ||
{{sourceDiff}} | ||
``` | ||
|
||
</td> | ||
</tr> | ||
{{/with}} | ||
{{/if}} | ||
<tr> | ||
<td>AppMap</td> | ||
<td><a href="./head/{{appmap}}.appmap.json">{{appmap}}</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
</details> | ||
|
||
{{/each}} | ||
|
||
## API changes | ||
|
||
{{#*inline "api-diff"}} | ||
{{action}} {{#each sourceSpecEntityDetails}}{{location}}{{/each}} | ||
{{/inline}} | ||
|
||
{{#if apiDiff.breakingDifferences}} | ||
### Breaking changes | ||
|
||
{{#each apiDiff.breakingDifferences}} | ||
- {{> api-diff }} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if apiDiff.nonBreakingDifferences}} | ||
### Non-breaking changes | ||
|
||
{{#each apiDiff.nonBreakingDifferences}} | ||
- {{> api-diff }} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if apiDiff.unclassifiedDifferences}} | ||
### Unclassified changes | ||
|
||
{{#each apiDiff.unclassifiedDifferences}} | ||
- {{> api-diff }} | ||
{{/each}} | ||
{{/if}} | ||
|
||
## Changed AppMaps | ||
{{#each changedAppMaps}} | ||
<details> | ||
|
||
<summary> | ||
{{appmap}} | ||
</summary> | ||
|
||
<table> | ||
<tbody> | ||
<tr> | ||
<td>Source diff</td> | ||
<td> | ||
|
||
```diff | ||
{{sourceDiff}} | ||
``` | ||
|
||
</td> | ||
</tr> | ||
<tr> | ||
<td>Sequence diagram diff</td> | ||
<td> | ||
<a href="./{{sequenceDiagramDiff}}">{{sequenceDiagramDiff}}</a> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
</details> | ||
{{/each}} | ||
|
||
## Changed code behavior | ||
|
||
{{#each sequenceDiagramDiffSnippets}} | ||
|
||
``` | ||
{{{@key}}} | ||
``` | ||
|
||
<details> | ||
<summary>{{ this.length }} occurrances</summary> | ||
|
||
{{#each this}} | ||
- [{{.}}](./diff/{{.}}.diff.sequence.json) | ||
{{/each}} | ||
</details> | ||
|
||
{{/each}} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import {Metadata} from '@appland/models'; | ||
import Finding from './Finding'; | ||
|
||
export type AppMapLink = string; | ||
export type SequenceDiagramLink = string; | ||
// AppMap file path, without the .appmap.json extension. | ||
export type AppMapName = string; | ||
// hex digest of an AppMap's canonical sequence diagram. | ||
export type AppMapDigest = string; | ||
|
||
export type ChangedAppMap = { | ||
appmap: string; | ||
sourceDiff?: string | undefined; | ||
sequenceDiagramDiff?: SequenceDiagramLink; | ||
}; | ||
|
||
export type TestFailure = { | ||
appmap: string; | ||
changedAppMap?: ChangedAppMap; | ||
name: string; | ||
testLocation?: string; | ||
}; | ||
|
||
export type ChangeReport = { | ||
testFailures: TestFailure[]; | ||
newAppMaps: AppMapLink[]; | ||
changedAppMaps: ChangedAppMap[]; | ||
newFindings: Finding[]; | ||
resolvedFindings: Finding[]; | ||
apiDiff: any; | ||
scanConfiguration: { | ||
base: any; | ||
head: any; | ||
}; | ||
appMapMetadata: { | ||
base: Record<AppMapName, Metadata>; | ||
head: Record<AppMapName, Metadata>; | ||
}; | ||
sequenceDiagramDiffSnippets: Record<string, AppMapLink[]>; | ||
}; |
Oops, something went wrong.