Skip to content

Change Missing Lambda Field

If a PR creates a new Lambda function, but lacks a description field, gitStream will request changes and post a comment that explains why.

Change Missing Lambda Info

Configuration Description

Conditions (all must be true):

  • The PR contains an update to a Lambda function.
  • The affected files are missing a description field.

Automation Actions:

  • Add a lambda-missing-field label to the PR.
  • Request changes and post a comment that explains why.

Change Missing Lambda Field

# -*- mode: yaml -*-
  version: 1.0

  # Request changes when required Lambda information is missing from the PR.
    # Triggered for new Lambda functions that are missing a description field.
      - {{ source.diff.files | matchDiffLines(regex=r/LambdaFunction/) | some }}
      - {{ source.diff.files | matchDiffLines(regex=r/description:/) | nope }}
    # Apply the lambda-missing-field label and request changes to the PR.
      - action: add-label@v1
          label: 'lambda-missing-field'
          color: '#FF0000'
      - action: request-changes@v1
          comment: |
            New `LambdaFunction` must have `description:` field.

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.