-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
allowing job url in template #5392
base: main
Are you sure you want to change the base?
Conversation
I do not think policy checks have a URL status at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the PR title and description to detail what this PR is actually doing, i.e. adding the job URL to the plan success model which can then be used by a custom plan success template. Also please detail the changes you have made to LockURLGenerator
and why.
It also needs markdown_renderer_test
updating with tests for this change.
@@ -35,3 +35,6 @@ tmp-CHANGELOG.md | |||
|
|||
# playwright | |||
test-results/ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this irrelevant .gitignore change
|
||
// LockURLGenerator generates urls to locks. | ||
type LockURLGenerator interface { | ||
// URLGenerator generates urls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// URLGenerator generates urls. | |
// URLGenerator generates lock and project urls. |
// GenerateLockURL returns the full URL to the lock at lockID. | ||
GenerateLockURL(lockID string) string | ||
GenerateProjectJobURL(ctx command.ProjectContext) (string, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a godoc comment for this
What
This PR adds support for including the job URL in the GitHub comment template.
Why
In certain cases, it's necessary to hide Terraform plan output in GitHub comments—such as in public repositories where the output may contain sensitive information. However, users may still need access to the plan details via a secure URL, such as one behind a firewall or ingress.
By including the job URL in the GitHub comment template (in addition to the existing GitHub check link), we provide users with clear guidance on why the output is hidden and where they can access it instead.
Tests
Tested locally by overriding the comment template and verifying the job URL was correctly included.
References
Notes
pegomock
unless I downgraded Go to 1.23.0 ingo.mod
.PolicyCheckResults
, but I’m unsure whether those results are accessible via a URL. Would appreciate any feedback on this!