-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Allow ignoring files, support config file #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for ignoring specific files during sync operations and introduces a configuration file mechanism to manage sync settings. The implementation allows users to specify ignore patterns either via action inputs or a YAML configuration file, with action inputs taking precedence over file-based configuration.
Key changes:
- Added file ignoring functionality with glob pattern support using minimatch
- Implemented configuration file loading from
.github/actions-sync.yml(customizable path) - Extended the Config type with
ignoreFilesandconfigFilePathfields
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/templates.ts | Adds shouldIgnoreFile function and filtering logic to skip files matching ignore patterns |
| src/templates.test.ts | Adds tests for exact match, glob pattern, and multiple pattern file ignoring scenarios |
| src/index.ts | Integrates config file loading into the main workflow |
| src/configFile.ts | Implements YAML config file parsing and merging with action inputs |
| src/configFile.test.ts | Comprehensive tests for config file loading, precedence rules, and error handling |
| src/config.ts | Extends Config type and adds configFilePath and ignoreFiles input retrieval |
| package.json | Adds dependencies for js-yaml and minimatch libraries |
| action.yml | Adds config-file and ignore-files input definitions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
59db9a8 to
aeda10b
Compare
aeda10b to
c9e9117
Compare
Across our repos we have a need to ignore certain files: