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

This adds PR comments with digger run fails #1579

Conversation

ben-of-codecraft
Copy link
Contributor

When a digger job would fail, the error message in the log did not show the output, it only reported it to the backend API. This information is helpful in debugging problems.

Additionally, this adds a PR comment with the error message.

@ben-of-codecraft
Copy link
Contributor Author

This is what is failing

    license_test.go:10: 
        	Error Trace:	/home/runner/work/digger/digger/libs/license/license_test.go:10
        	Error:      	Received unexpected error:
        	            	license key is not valid: {"valid":false}
        	Test:       	TestLicenseKeyChecker
--- FAIL: TestLicenseKeyChecker (0.93s)
FAIL
FAIL	github.com/diggerhq/digger/libs/license	0.932s

Not sure why this one is failing any thoughts?

@motatoes
Copy link
Contributor

This looks great, but we prefer to use reporter object when reporting since it will append it to the same comment for the job isntead of creating a new comment. See example usage here:

_, _, err = reporter.Report(planSummary, coreutils.AsComment("Terraform plan summary"))

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