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

fix: Fix redundant empty line in markdown output when no project counts are shown #2340

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

vdmgolub
Copy link
Contributor

@vdmgolub vdmgolub commented Mar 7, 2023

Caught this in failing GH actions tests: https://github.com/infracost/actions/actions/runs/4359407857/jobs/7621166205

Before:

💰 Infracost estimate: **monthly cost will increase by $586 (+73%) 📈**
<table>
  <thead>
    <td>Project</td>
    <td>Previous</td>
    <td>New</td>
    <td>Diff</td>
  </thead>
  <tbody>
    <tr>
      <td>infracost/actions/examples/multi-project-config-file/code/dev</td>
      <td align="right">$51.97</td>
      <td align="right">$77.37</td>
      <td>+$25.40 (+49%)</td>
    </tr>
    <tr>
      <td>infracost/actions/examples/multi-project-config-file/code/prod</td>
      <td align="right">$748</td>
      <td align="right">$1,308</td>
      <td>+$561 (+75%)</td>
    </tr>
    <tr>
      <td>All projects</td>
      <td align="right">$800</td>
      <td align="right">$1,386</td>
      <td>+$586 (+73%)</td>
    </tr>
  </tbody>
</table>


<details>
<summary><strong>Infracost output</strong></summary>

With the fix:

💰 Infracost estimate: **monthly cost will increase by $586 (+73%) 📈**
<table>
  <thead>
    <td>Project</td>
    <td>Previous</td>
    <td>New</td>
    <td>Diff</td>
  </thead>
  <tbody>
    <tr>
      <td>infracost/actions/examples/multi-project-config-file/code/dev</td>
      <td align="right">$51.97</td>
      <td align="right">$77.37</td>
      <td>+$25.40 (+49%)</td>
    </tr>
    <tr>
      <td>infracost/actions/examples/multi-project-config-file/code/prod</td>
      <td align="right">$748</td>
      <td align="right">$1,308</td>
      <td>+$561 (+75%)</td>
    </tr>
    <tr>
      <td>All projects</td>
      <td align="right">$800</td>
      <td align="right">$1,386</td>
      <td>+$586 (+73%)</td>
    </tr>
  </tbody>
</table>

<details>
<summary><strong>Infracost output</strong></summary>

With project counts:

💰 Infracost estimate: **monthly cost will increase by $561 (+70%) 📈**
<table>
  <thead>
    <td>Project</td>
    <td>Previous</td>
    <td>New</td>
    <td>Diff</td>
  </thead>
  <tbody>
    <tr>
      <td>infracost/actions/examples/multi-project-config-file/code/prod</td>
      <td align="right">$748</td>
      <td align="right">$1,308</td>
      <td>+$561 (+75%)</td>
    </tr>
    <tr>
      <td>All projects</td>
      <td align="right">$800</td>
      <td align="right">$1,360</td>
      <td>+$561 (+70%)</td>
    </tr>
  </tbody>
</table>

1 project has no cost estimate changes.

<details>
<summary><strong>Infracost output</strong></summary>

@vdmgolub vdmgolub self-assigned this Mar 7, 2023
@vdmgolub vdmgolub marked this pull request as ready for review March 7, 2023 23:47
@vdmgolub vdmgolub requested a review from tim775 March 7, 2023 23:47
@vdmgolub vdmgolub merged commit 466a2a2 into master Mar 9, 2023
@vdmgolub vdmgolub deleted the fix/extra-empty-line branch March 9, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants