Skip to content

Add agentic workflow for automatic CHANGELOG PR link addition#442

Merged
Mossaka merged 3 commits into
mainfrom
copilot/add-agentic-workflow-for-changelog
Oct 22, 2025
Merged

Add agentic workflow for automatic CHANGELOG PR link addition#442
Mossaka merged 3 commits into
mainfrom
copilot/add-agentic-workflow-for-changelog

Conversation

Copilot AI commented Oct 22, 2025

Copy link
Copy Markdown
Contributor

Overview

This PR adds a new GitHub Agentic Workflow that automatically ensures all CHANGELOG entries include proper PR links, similar to the existing issue triage workflow.

Problem

When contributors add entries to CHANGELOG.md, they often forget to include the PR link or use inconsistent formatting. This makes it harder to trace changes back to their source PRs and maintain a consistent changelog format.

Solution

Created changelog-pr-link.md, an agentic workflow that:

  1. Triggers automatically when a PR modifies CHANGELOG.md (on opened and synchronize events)
  2. Analyzes git diff to find new entries in the ## [Unreleased] section without PR links
  3. Adds proper PR links in the standard format: ([#123](https://github.com/microsoft/wassette/pull/123))
  4. Condenses multi-line entries into single lines when appropriate
  5. Creates a PR with the changes using the safe-outputs.create-pull-request feature

Example

Before (new CHANGELOG entry without PR link):

- Added new feature for XYZ

After (workflow adds PR link automatically):

- Added new feature for XYZ ([#123](https://github.com/microsoft/wassette/pull/123))

Security Features

  • Minimal permissions: Only requires read access to contents, pull-requests, and actions
  • Security notice: Includes warnings against prompt injection attacks
  • Restricted scope: Only modifies CHANGELOG.md in the Unreleased section
  • Safe outputs: Uses safe-outputs.create-pull-request to securely create PRs without write permissions

Implementation Details

The workflow uses:

  • Engine: GitHub Copilot
  • Trigger: pull_request events with path filter for CHANGELOG.md
  • Tools: bash (for git operations) and edit (for file modifications)
  • Safe-outputs: create-pull-request with [auto] prefix and automation, changelog labels
  • Timeout: 10 minutes

Files Changed

  • .github/workflows/changelog-pr-link.md (107 lines) - Workflow definition
  • .github/workflows/changelog-pr-link.lock.yml (4,307 lines) - Auto-generated GitHub Actions YAML
  • CHANGELOG.md - Added entry documenting this new workflow

Verification

$ gh aw compile changelog-pr-link
✓ .github/workflows/changelog-pr-link.md (210.5 KB)
✓ Compiled 1 workflow(s): 0 error(s), 0 warning(s)

Both the markdown workflow file and the compiled YAML lock file are included in this PR, as required by the agentic workflows system.

Related

Follows the same pattern as the existing issue-triage.md workflow and uses the safe-outputs feature as documented in https://githubnext.github.io/gh-aw/reference/safe-outputs/.

Original prompt

Similar to issue triage, create an agentic workflow in .github/workflows that for each PR that modifies the CHANGELOG, the workflow should find that PR link and add the link at the end of the newly added line in that CHANGELOG. If the PR modifies multiple lines the CHANGELOG, they should be condensed into one line and make sure they can only modify in the unreleased section. your agentic workflow should use https://githubnext.github.io/gh-aw/reference/safe-outputs/ feature to perform the necessary WRITE changes to the PRs.

example: - Support for Streamable HTTP transport in addition to existing SSE transport (#100)

Make sure gh aw compile passes and check in both markdown and yaml files.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 22, 2025 05:51
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Create agentic workflow for CHANGELOG modifications Add agentic workflow for automatic CHANGELOG PR link addition Oct 22, 2025
Copilot AI requested a review from Mossaka October 22, 2025 05:58
@Mossaka Mossaka marked this pull request as ready for review October 22, 2025 06:05
@Mossaka Mossaka merged commit e4d255e into main Oct 22, 2025
46 of 52 checks passed
@Mossaka Mossaka deleted the copilot/add-agentic-workflow-for-changelog branch October 22, 2025 06:07
Mossaka added a commit to Mossaka/wassette that referenced this pull request Feb 2, 2026
…oft#442)

* Initial plan

* Add CHANGELOG PR link automation workflow

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>

* Update CHANGELOG.md with new agentic workflow entry

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants