Skip to content

Conversation

@pelikhan
Copy link
Contributor

@pelikhan pelikhan commented Sep 4, 2025

Support for specificing allowed fork repositories to enable/disable workflows

…for pull request triggers (#58)

* Initial plan

* Implement fork: true/false field for pull-request triggers

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Add fork: false to test-proxy.md workflow as requested

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Implement enhanced fork filtering with array support and glob patterns

- Add forks: []string field support alongside legacy fork: boolean
- Implement glob pattern matching (e.g., "org/*") for organization-level fork allowlists
- Add BuildFromAllowedForks expression builder with startsWith() function support
- Update schema validation to include new forks array field
- Enhanced commentOutProcessedFieldsInOnSection to handle forks arrays
- Add comprehensive test coverage with 11+ new test scenarios
- Apply fork: false to example-engine-network-permissions.md as requested
- Maintain full backward compatibility with existing fork: true/false syntax
- forks array takes precedence over legacy fork field when both present
- All workflows compile successfully and tests pass

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Remove legacy fork: true/false support, keep only forks array with glob patterns

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Support single string and wildcard (*) for forks field in pull request triggers

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
@pelikhan pelikhan merged commit fd4ecad into githubnext:main Sep 4, 2025
9 checks passed
@pelikhan pelikhan deleted the pelikhan/forks branch September 4, 2025 18:20
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.

1 participant