Skip to content

Request Screenshot

If the PR lacks an image file, or link to an image in the description, apply a no-screenshot label and post a comment to request a screenshot. If the PR author updates the description, gitStream will remove the label.

Request Screenshot

Configuration Description

Conditions (all must be true):

  • The PR description lacks an image or link to an image.

Automation Actions:

  • Apply a no-screenshot label.
  • Post a comment that requests a screenshot. Update this action to provide specific context for your project.

Request Screenshot

# -*- mode: yaml -*-

  version: 1.0

    # Triggered for PRs that lack an image file or link to an image in the PR description
      - {{ not (has.screenshot_link or has.image_uploaded) }}
      - action: add-label@v1
          label: 'no-screenshot'
          color: '#FF000A'
      - action: add-comment@v1
          comment: |
            Be a life saver 🛟 by adding a screenshot of the changes you made.

  screenshot_link: {{ pr.description | includes(regex=r/!\[.*\]\(.*(jpg|svg|png|gif|psd).*\)/) }}
  image_uploaded: {{ pr.description | includes(regex=r/<img.*src.*(jpg|svg|png|gif|psd).*>/) }}

Additional Resources

gitStream is a workflow automation tool that enables you to use YAML configuration files to optimize your code review process. Add context to PRs, find code experts for reviews, and automate the merge process to maximize developer productivity.

Learn More about how gitStream Works.

Related Automations:

More Automations can be found on the Automation Library and Integrations pages.