Skip to content

[tidy] Recompile workflow files with latest updates#1839

Merged
pelikhan merged 2 commits intomainfrom
copilot/recompile-workflow-files-update
Oct 17, 2025
Merged

[tidy] Recompile workflow files with latest updates#1839
pelikhan merged 2 commits intomainfrom
copilot/recompile-workflow-files-update

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 17, 2025

Summary

This PR recompiles all workflow lock files to incorporate the latest compiler improvements from PR #1833 ("Fix comment creation to post to parent thread instead of replacing comments"). The recompilation ensures that all agentic workflows use the correct GitHub API endpoints for comment operations.

Changes Made

Recompiled 11 workflow lock files through make recompile:

  • brave.lock.yml
  • changeset-generator.lock.yml
  • dev.lock.yml
  • issue-classifier.lock.yml
  • pdf-summary.lock.yml
  • plan.lock.yml
  • poem-bot.lock.yml
  • q.lock.yml
  • scout.lock.yml
  • tidy.lock.yml
  • unbloat-docs.lock.yml

Key Improvements

Improved Comment Endpoint Handling

The recompilation updates the generated GitHub Actions workflows with two critical fixes:

1. Issue Comment Events (issue_comment)

  • Added validation to ensure issue number is present in the event payload
  • Updated comment endpoint from /repos/{owner}/{repo}/issues/comments/{commentId} to /repos/{owner}/{repo}/issues/{issueNumber}/comments
  • This ensures comments are posted as new comments in the parent thread rather than attempting to update a specific comment

2. Pull Request Review Comment Events (pull_request_review_comment)

  • Added validation to ensure PR number is present in the event payload
  • Updated comment endpoint from /repos/{owner}/{repo}/pulls/comments/{reviewCommentId} to /repos/{owner}/{repo}/issues/{prNumber}/comments
  • This ensures review comments are posted to the PR's comment thread correctly

Example of Changes

Before:

case "issue_comment":
  const commentId = context.payload?.comment?.id;
  if (!commentId) {
    core.setFailed("Comment ID not found in event payload");
    return;
  }
  commentUpdateEndpoint = `/repos/${owner}/${repo}/issues/comments/${commentId}`;

After:

case "issue_comment":
  const commentId = context.payload?.comment?.id;
  const issueNumberForComment = context.payload?.issue?.number;
  if (!commentId) {
    core.setFailed("Comment ID not found in event payload");
    return;
  }
  if (!issueNumberForComment) {
    core.setFailed("Issue number not found in event payload");
    return;
  }
  commentUpdateEndpoint = `/repos/${owner}/${repo}/issues/${issueNumberForComment}/comments`;

Testing

  • All Go code formatting verified with make fmt
  • Binary built successfully with make build
  • Workflow compilation completed successfully with 0 errors
  • Note: There is one pre-existing test failure in pkg/workflow that is unrelated to these tidying changes

AI generated by Tidy workflow

Original prompt

This section details on the original issue you should resolve

<issue_title>[tidy] Recompile workflow files with latest updates</issue_title>
<issue_description>## Summary

This PR contains code tidying updates from the automated tidy agent. The changes were made by running make recompile to ensure all workflow lock files are up to date with the latest compiler improvements.

Changes Made

  • ✅ Ran make fmt - No formatting issues found
  • ✅ Ran make lint - All linting checks passed
  • ✅ Ran make recompile - Recompiled 64 workflow files successfully
  • ✅ Updated 11 workflow lock files with latest changes

Workflow Lock File Updates

The recompilation updated the following workflow files:

  • brave.lock.yml
  • changeset-generator.lock.yml
  • dev.lock.yml
  • issue-classifier.lock.yml
  • pdf-summary.lock.yml
  • plan.lock.yml
  • poem-bot.lock.yml
  • q.lock.yml
  • scout.lock.yml
  • tidy.lock.yml
  • unbloat-docs.lock.yml

Key Improvements

The main changes in the lock files include:

  • Improved comment endpoint handling for issue_comment events (now properly includes issue number validation)
  • Improved comment endpoint handling for pull_request_review_comment events (now properly includes PR number validation)
  • Updated comment update endpoints to use the correct API path structure

Testing

  • All Go code formatting is correct
  • All JavaScript/TypeScript linting passed
  • Workflow compilation completed successfully with 0 errors and 12 warnings
  • Note: There is one pre-existing test failure in pkg/workflow that is unrelated to these tidying changes

Labels

automation

AI generated by Tidy


[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available as an artifact (aw.patch) in the workflow run linked above.
To apply the patch locally:

# Download the artifact from the workflow run https://github.com/githubnext/gh-aw/actions/runs/18583062067
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 18583062067 -n aw.patch
# Apply the patch
git am aw.patch
Show patch preview (489 of 489 lines)
From 5a93835d52528743dcc070d32e2e03ab93addd3b Mon Sep 17 00:00:00 2001
From: Tidy <github-actions[bot]@users.noreply.github.com>
Date: Fri, 17 Oct 2025 05:12:53 +0000
Subject: [PATCH] [tidy] Recompile workflow files with latest updates

- Updated 11 workflow lock files through make recompile
- Changes include improved comment endpoint handling for issue and PR comments
- All formatting and linting checks passed
- Workflow recompilation completed successfully
---
 .github/workflows/brave.lock.yml               | 14 ++++++++++++--
 .github/workflows/changeset-generator.lock.yml | 14 ++++++++++++--
 .github/workflows/dev.lock.yml                 | 14 ++++++++++++--
 .github/workflows/issue-classifier.lock.yml    | 14 ++++++++++++--
 .github/workflows/pdf-summary.lock.yml         | 14 ++++++++++++--
 .github/workflows/plan.lock.yml                | 14 ++++++++++++--
 .github/workflows/poem-bot.lock.yml            | 14 ++++++++++++--
 .github/workflows/q.lock.yml                   | 14 ++++++++++++--
 .github/workflows/scout.lock.yml               | 14 ++++++++++++--
 .github/workflows/tidy.lock.yml                | 14 ++++++++++++--
 .github/workflows/unbloat-docs.lock.yml        | 14 ++++++++++++--
 11 files changed, 132 insertions(+), 22 deletions(-)

diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml
index febfd0b..8d5dc38 100644
--- a/.github/workflows/brave.lock.yml
+++ b/.github/workflows/brave.lock.yml
@@ -373,12 +373,17 @@ jobs:
                     break;
                   case "issue_comment":
                     const commentId = context.payload?.comment?.id;
+                    const issueNumberForComment = context.payload?.issue?.number;
                     if (!commentId) {
                       core.setFailed("Comment ID not found in event payload");
                       return;
                     }
+                    if (!issueNumberForComment) {
+                      core.setFailed("Issue number not found in eve
... (truncated)

Comments on the Issue (you are @copilot in this section)

Fixes #1837


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow files with latest compiler improvements [tidy] Recompile workflow files with latest updates Oct 17, 2025
Copilot AI requested a review from pelikhan October 17, 2025 05:49
@pelikhan pelikhan marked this pull request as ready for review October 17, 2025 05:51
@pelikhan pelikhan merged commit cfd1edd into main Oct 17, 2025
5 checks passed
@pelikhan pelikhan deleted the copilot/recompile-workflow-files-update branch October 17, 2025 05:51
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.

[tidy] Recompile workflow files with latest updates

2 participants