Skip to content

Commit

Permalink
Merge pull request #754 from patrickkempff/feature/github-issue-templ…
Browse files Browse the repository at this point in the history
…ate-layout

Prevent GitHub adding a <p> tag to <td> inside issue comment.
  • Loading branch information
orta authored Nov 5, 2018
2 parents f11723a + e16d2d7 commit 3419b64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
## Master

- Fix #614 - Posting status updates to Github using issue workflow broken - [@sgtcoolguy][]
- Fix vertical alignment in GitHub issue template - [@patrickkempff][]

# 5.0.1, err. 6.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`generating inline messages Shows correct message for multiple inline vi
DangerID: danger-id-blankID;
File: File.swift;
Line: 10;
-->
-->
- :no_entry_sign: Test message
- :no_entry_sign: Warning message
- :warning: Test message
Expand Down Expand Up @@ -43,18 +43,12 @@ exports[`generating inline messages Shows correct messages for inline/regular vi
</thead>
<tbody><tr>
<td>:warning:</td>
<td>
**File.swift#L10** - Test message
</td>
<td>**File.swift#L10** - Test message</td>
</tr>
<tr>
<td>:warning:</td>
<td>
Warning message
</td>
<td>Warning message</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -86,10 +80,7 @@ exports[`generating messages leaves space between <td>s to allow GitHub to rende
</thead>
<tbody><tr>
<td>:no_entry_sign:</td>
<td>
**Failure:** Something failed!
</td>
<td>**Failure:** Something failed!</td>
</tr>
</tbody>
</table>
Expand All @@ -104,10 +95,7 @@ exports[`generating messages leaves space between <td>s to allow GitHub to rende
</thead>
<tbody><tr>
<td>:warning:</td>
<td>
_Maybe you meant to run \`yarn install\`?_
</td>
<td>_Maybe you meant to run \`yarn install\`?_</td>
</tr>
</tbody>
</table>
Expand All @@ -122,14 +110,11 @@ exports[`generating messages leaves space between <td>s to allow GitHub to rende
</thead>
<tbody><tr>
<td>:book:</td>
<td>
\`\`\`ts
<td>\`\`\`ts
function add(a: number, b: number): number {
return a + b
}
\`\`\`
</td>
\`\`\`</td>
</tr>
</tbody>
</table>
Expand Down
7 changes: 2 additions & 5 deletions source/runner/templates/githubIssueTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ function table(name: string, emoji: string, violations: Violation[]): string {
const message = isInline(v) ? `**${v.file!}#L${v.line!}** - ${v.message}` : v.message
return `<tr>
<td>:${emoji}:</td>
<td>
${message}
</td>
<td>${message}</td>
</tr>
`
})
Expand Down Expand Up @@ -103,7 +100,7 @@ export function inlineTemplate(dangerID: string, results: DangerResults, file: s
<!--
${buildSummaryMessage(dangerID, results)}
${fileLineToString(file, line)}
-->
-->
${results.fails.map(printViolation("no_entry_sign")).join("\n")}
${results.warnings.map(printViolation("warning")).join("\n")}
${results.messages.map(printViolation("book")).join("\n")}
Expand Down

0 comments on commit 3419b64

Please sign in to comment.