-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: refactor sync template workflow to work in a whitelist setting #78
base: development
Are you sure you want to change the base?
Conversation
Here is a QA, though it's failed because I don't have auth setup, you can see through the logs the modified files: 1. can create files with whitelist |
- name: Sync branch to template | ||
env: | ||
GH_TOKEN: ${{ steps.get_installation_token.outputs.token }} | ||
WHITELIST_FILES: ".github/workflows/build.yml tsconfig.json" |
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.
Shouldn't it be a much longer list
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.
this is a demo only
env: | ||
GH_TOKEN: ${{ steps.get_installation_token.outputs.token }} | ||
WHITELIST_FILES: ".github/workflows/build.yml tsconfig.json" | ||
ADDITIONAL_FILES: ${{ github.event.inputs.additional_files }} |
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.
Is this a list? How exactly is this defined? What's the value in your qa
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.
For example in this QA, I dispatched with the following inputs: .eslintrc,.prettierrc,.github/
With the intention of synchronizing .eslintrc, .prettierrc and the entire .github/ directory, you can see it works as intended:
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.
I'll improve the description, it's a little bit confusing
My solution enables individual repo configuration, the whitelist for this repo's
Therefore a second step to this PR, is opening PRs in repos that implement |
@zugdev, this task has been idle for a while. Please provide an update. |
Resolves #61
The sync workflow should only propose changes automatically on shared files between repos, I agree those include some of the workflows and ts settings. What I would propose is to enable manual workflow runs with input files too. This way if you want every repo that uses the template to receive a specific new file or to create an overwriting, but not too big PR, you can do it. I believe the AI analysis even though might help, would still need a thorough review and would not reduce any time overhead. I am not sure centralizing the sync workflow is a good idea, if so we would need another way to identify which repos implement the template, to only open PRs in those. If it is really needed we can have a repos list in the workflow, but I think having the sync template in this repo and skipping when it runs here is sufficient to deliver updates to all sync-template workflows across our implementations.