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

Include an image in a comment #15

Open
bpbond opened this issue Sep 29, 2021 · 2 comments
Open

Include an image in a comment #15

bpbond opened this issue Sep 29, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@bpbond
Copy link

bpbond commented Sep 29, 2021

Hi, thanks for this useful bot. I'm interested in including an image in the auto-comment (e.g. PR diagnostics, generated from a script that's run in an earlier job in the workflow). Is this possible?

Expected Behavior

Something like this (just in terms of there being a comment with an image, don't mean Codecov specifically):
Screen Shot 2021-09-29 at 12 32 58 PM

Possible Solution

I've done a lot of googling, but haven't found a good solution—would welcome advice!

Additional Context

Thank you! cc @leeyap

@bpbond bpbond added the enhancement New feature or request label Sep 29, 2021
@github-actions
Copy link

👋 @bpbond
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.

@bubkoo
Copy link
Member

bubkoo commented Sep 30, 2021

Hi, @urish The earlier job should output the image url, then we can embed the image in the comment.

ref: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idoutputs

name: Auto Comment
on: [issues, pull_request]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: xxx/action-to-generate-images
         id: images
      - uses: wow-actions/auto-comment@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          pullRequestOpened: |
            👋 @{{ author }}
            Thank you for raising your pull request.
            ![image](${{ steps.images.outputs.url }})

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

2 participants