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 -*-
manifest:
  version: 1.0

automations:
  # Request changes when required Lambda information is missing from the PR.
  catch_missing_lambda_info:
    # Triggered for new Lambda functions that are missing a description field.
    if:
      - {{ 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.
    run:
      - action: add-label@v1
        args:
          label: 'lambda-missing-field'
          color: '#FF0000'
      - action: request-changes@v1
        args:
          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.