Skip to content

add comments for PR#39

Open
robermp wants to merge 1 commit intotenable:mainfrom
robermp:feature/add_outputs
Open

add comments for PR#39
robermp wants to merge 1 commit intotenable:mainfrom
robermp:feature/add_outputs

Conversation

@robermp
Copy link

@robermp robermp commented Dec 7, 2021

To add comments in PULL request:
- name: Comment on PR
uses: actions/github-script@0.9.0
if: github.event_name == 'pull_request'
env:
terrascan_log: "${{ steps.terrascan.outputs.result }}"
terrascan_err: "${{ steps.terrascan.outputs.err }}"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
### ${ terrascan_result } Terrascan Validation 🔍

Logs
Output

      ${ CODE_BLOCK }
      ${ process.env.terrascan_log }
      ${ CODE_BLOCK }

      Result
      ${ CODE_BLOCK }
      ${ process.env.terrascan_plan_err }
      ${ CODE_BLOCK }

      </details> <!-- End Terrascan Logs -->

@cesar-rodriguez
Copy link

Hey @robermp do you have an example of this working?

@robermp
Copy link
Author

robermp commented May 18, 2022

Here is a example of the output in PR
image

@AnhQKatalon
Copy link

Is there any process for this PR? I am also need this function to output the test result as a PR comment

@Rchanger
Copy link
Contributor

LGTM, @robermp can you please resolve the conflicts. Thank you for contributing

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.

5 participants