Skip to content

Improve automated PR body with a summary of module version changes #60

Description

@d-lazenby

Summary

The PR created by the update-tf-modules workflow currently has a static, uninformative body:

Automated update of Terraform module versions.

This gives reviewers no visibility into what actually changed.

Proposed improvement

Before the create_pull_request step, generate a dynamic PR body that summarises the diff — for example, a Markdown table of module name, old version and new version:

Module Old version New version
github.com/org/module v1.2.3 v1.3.0
registry.terraform.io/... 1.0.0 1.1.0

This could be generated by diffing the changed .tf files with git diff and parsing the source = lines, then passed to the body: input of peter-evans/create-pull-request.

Acceptance criteria

  • PR body lists each updated module with its old and new version reference.
  • Falls back to the current static message if no structured diff can be parsed.

Relevant file: update-tf-modules.yml (lines 151–157, body: field of create_pull_request step)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions