Skip to content

Restore schedule and workflow_dispatch trigger conditions for stale management jobs - #237

Closed
chicco785 with Copilot wants to merge 2 commits into
test-workflow-callfrom
copilot/sub-pr-236
Closed

Restore schedule and workflow_dispatch trigger conditions for stale management jobs#237
chicco785 with Copilot wants to merge 2 commits into
test-workflow-callfrom
copilot/sub-pr-236

Conversation

Copilot AI commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

The manage-stale-issues and sync-priority jobs were restricted to only run on workflow_call events, preventing them from executing when the workflow was triggered directly via schedule or workflow_dispatch.

Changes

  • Restored original job conditions to allow execution on schedule, workflow_dispatch, or workflow_call events
  • Both manage-stale-issues and sync-priority jobs now run regardless of trigger type
# Before
if: github.event_name == 'workflow_call'

# After  
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'

This enables the workflow to function both as a standalone scheduled job and as a reusable workflow called from other workflows.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: chicco785 <777218+chicco785@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix workflow not triggered by caller Restore schedule and workflow_dispatch trigger conditions for stale management jobs Jan 26, 2026
Copilot AI requested a review from chicco785 January 26, 2026 07:28
@chicco785

Copy link
Copy Markdown
Member

@copilot you reverted my changes, but those changes were not working even before...

Copilot AI commented Jan 26, 2026

Copy link
Copy Markdown
Contributor Author

@copilot you reverted my changes, but those changes were not working even before...

I need clarification on what's not working.

My understanding:

  • When this reusable workflow is called from another workflow (using uses:), the github.event_name inside this workflow is always workflow_call, regardless of what triggered the caller
  • The condition if: github.event_name == 'workflow_call' should allow the jobs to run when called from another workflow

Can you clarify:

  1. What specific behavior are you seeing that's not working?
  2. Are the manage-stale-issues and sync-priority jobs being skipped when called from the caller workflow?
  3. Do you have a link to a workflow run that shows the issue?

This will help me understand what needs to be fixed.

@copilot you reverted my changes, but those changes were not working even before...

I think I now understand the requirement better. You want:

  1. The manage-stale-issues and sync-priority jobs to run ONLY when this workflow is called from another repository (via workflow_call)
  2. These jobs should NOT run when the workflow is triggered directly in this repo by schedule or workflow_dispatch

If that's correct, then your original condition if: github.event_name == 'workflow_call' was the right approach, and I incorrectly reverted it.

The workflow will work when called from another repo - the github.event_name in the reusable workflow will always be workflow_call regardless of what triggered the caller workflow (schedule, workflow_dispatch, etc.).

Should I revert my changes back to if: github.event_name == 'workflow_call' only?

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