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

RFE: Post results as comment back to GitHub Pullrequest #12

Open
jgrumboe opened this issue Oct 4, 2024 · 6 comments
Open

RFE: Post results as comment back to GitHub Pullrequest #12

jgrumboe opened this issue Oct 4, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@jgrumboe
Copy link

jgrumboe commented Oct 4, 2024

Hi,

The run task looks promising in understanding specific changes better.
I had a quick look at https://developer.hashicorp.com/terraform/cloud-docs/integrations/run-tasks#integration-details and saw that the payload for the run task would also include VCS information like commit and PR URLs.
If it's a speculative plan, it would be great to also send the results back as a comment to the originating PR.
What do you think?

Best regards,
Johannes

@wellsiau-aws
Copy link
Collaborator

that is a good suggestion, thank you @jgrumboe

we have a few potential way to do it:

  1. Since we know the workspace id, we could push comment on the Workspace run, or
  2. As you suggested, bubble up the finding as pull request on the originating PR

@wellsiau-aws wellsiau-aws added the enhancement New feature or request label Oct 4, 2024
@jgrumboe
Copy link
Author

jgrumboe commented Oct 4, 2024

Thinking of our dev teams, the PR is the "source of truth" 🙂

The workspace comments are not used at all here.

@wellsiau-aws
Copy link
Collaborator

if you are using the tfc-workflow-tooling , we might able to bubble up the RunTasks plan output as part of it (which today is not yet available).
Ref: https://github.com/hashicorp/tfc-workflows-tooling/blob/main/docs/USAGE.md#available-commands

cc @gautambaghel

@jgrumboe
Copy link
Author

jgrumboe commented Oct 7, 2024

We're not using the tf-workflow-tooling; our workspaces are "normal" VCS connected.

@gautambaghel
Copy link
Collaborator

Hey @jgrumboe I opened a new PR #13 to address this, would this satisfy your requirement? The additional piece would be that you need to supply the GitHub token.

It needs to be a Fine-grained personal access tokens

with access to

  • Read access to metadata
  • Read and Write access to pull requests

@jgrumboe
Copy link
Author

@gautambaghel
Thanks, and sorry for coming back here so late.
I will give it a try in the next weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants