Fix get-changed-files action for schedule and workflow_dispatch events#27078
Open
SufficientDaikon wants to merge 1 commit intoPowerShell:masterfrom
Open
Fix get-changed-files action for schedule and workflow_dispatch events#27078SufficientDaikon wants to merge 1 commit intoPowerShell:masterfrom
get-changed-files action for schedule and workflow_dispatch events#27078SufficientDaikon wants to merge 1 commit intoPowerShell:masterfrom
Conversation
… events The `Verify Markdown Links` workflow declares four triggers but `get-changed-files` only handles `pull_request` and `push`, causing every weekly Sunday cron run to fail with "Unsupported event type: schedule" since PR PowerShell#26219 (October 2025). Add a code path that uses the GitHub Trees API to enumerate all repository files for `schedule` and `workflow_dispatch` events, then feeds them through the existing filter and output logic. Update the markdownlinks action to pass the new event types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
@jshigetomi — This fixes the The existing CI is green. Happy to adjust anything. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Fixes the
Verify Markdown Linksworkflow that has been failing every Sunday since October 2025. The underlyingget-changed-filesaction only handlespull_requestandpushevents but the workflow also usesscheduleandworkflow_dispatchtriggers.Fixes #27091.
Caution
Every scheduled run has been failing with this error since the workflow was introduced in #26219:
What Changed
get-changed-files/action.ymlschedule+workflow_dispatchevent handlers using GitHub Trees APImarkdownlinks/action.ymlevent-typesto includeschedule,workflow_dispatchget-changed-files/README.mdEvent Routing
The existing
pull_requestandpushcode paths are completely untouched. The new path only activates forscheduleandworkflow_dispatch:flowchart LR A["Trigger"] --> B{"Event type?"} B -->|pull_request| C["PR Files API\n(paginated)"] B -->|push| D["Commit\ncomparison"] B -->|schedule| E["Trees API\n(recursive)\n✨ NEW"] B -->|workflow_dispatch| E C --> F["Filter → check links"] D --> F E --> FFor
schedule/workflow_dispatchevents there is no diff to compare, so the new code path usesgithub.rest.git.getTreewithrecursive: 'true'to enumerate all blobs, then feeds them through the existing filter logic. Atree.truncatedwarning is logged if the repository exceeds GitHub's ~100K entry API limit.Tip
How to test after merge: Go to Actions → Verify Markdown Links → Run workflow → select
masterbranch. The next Sunday cron run will also exercise the new path.PR Context
The
get-changed-filescomposite action has code paths forpull_request(compare via PR files API with pagination) andpush(compare via commit comparison), but no path forscheduleorworkflow_dispatchevents. These events have no PR number and no before/after commit SHAs, so neither existing branch applies.The workflow was introduced in #26219 (October 2025) with the
scheduletrigger, but the action was never updated to support it.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header