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 -*-

manifest:
  version: 1.0

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

has:
  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.