Skip to content

adds diff back on error#76

Merged
jakecoffman merged 5 commits intomainfrom
jakecoffman/add-diffs-back-part-2
Mar 27, 2023
Merged

adds diff back on error#76
jakecoffman merged 5 commits intomainfrom
jakecoffman/add-diffs-back-part-2

Conversation

@jakecoffman
Copy link
Member

@jakecoffman jakecoffman commented Mar 10, 2023

This is another attempt to add diffs back to the CLI output when a test fails. See #42 for a previous try.

This time I've added it to the very end of the run, as if you had run diff against the output result and the input. Here's a small example:

INFO Results:
+-----------------------------------------------------------+
|            Changes to Dependabot Pull Requests            |
+---------+-------------------------------------------------+
| created | github.com/fatih/color ( from 1.7.0 to 1.13.0 ) |
+---------+-------------------------------------------------+
time="2023-03-10T16:07:13Z" level=info msg="15/145 calls cached (10%)"
--- ../smoke-tests/tests/smoke-go.yaml
+++ result.txt
@@ -97,7 +97,7 @@
     - type: create_pull_request
       expect:
         data:
-            base-commit-sha: 941c9223edd97d1234567890a404d038a4bc846c4
+            base-commit-sha: 941c9223edd97d233737435a404d038a4bc846c4
             dependencies:
                 - name: github.com/fatih/color
                   previous-requirements:
@@ -227,6 +227,7 @@
                 Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.7.0 to 1.13.0.
                 - [Release notes](https://github.com/fatih/color/releases)
                 - [Commits](https://github.com/fatih/color/compare/v1.7.0...v1.13.0)
+            grouped-update: false
     - type: mark_as_processed
       expect:
         data:

2023/03/10 10:07:13 update failed expectations

Previous attempts put the diff inline which made it hard to follow what was going on.

@jakecoffman jakecoffman marked this pull request as ready for review March 22, 2023 15:36
@jakecoffman jakecoffman requested a review from a team as a code owner March 22, 2023 15:36
Co-authored-by: Landon Grindheim <landongrindheim@github.com>
@jakecoffman jakecoffman merged commit d9dd2f3 into main Mar 27, 2023
@jakecoffman jakecoffman deleted the jakecoffman/add-diffs-back-part-2 branch March 27, 2023 15:11
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.

2 participants