Skip to content
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: upstream sync workflow V2 #100

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

asdolo
Copy link
Collaborator

@asdolo asdolo commented Nov 28, 2024

What does this do?

  • Remove the now deprecated upstream-to-pr.yml workflow.
  • Add the new sync-with-upstream.yml workflow with the following changes:
    • Change schedule to run the workflow from Monday to Friday, instead of every day.
    • Add a new template-version input to the workflow to manually indicate to which upstream version the template needs to be updated.
    • Update needed permissions of both workflow and Personal Access Token to the minimum, using a fine-grained token.
  • Backport some of the new features to sync-with-template.yml workflow.
  • Minor changes to the cli script.

Why did you do this?

To introduce the following new features:

  • Integrate changes from the latest release by default: The workflow now defaults to integrating changes from the latest stable release instead of pulling from the upstream master branch, which can be unstable.
  • Integrate changes from a specific release: Enables selecting a specific release version for integration. This allows for incremental upgrades, avoiding large pull requests and facilitating staggered updates. The workflow can be run manually by specifying the desired release in the release field:
    image
  • Add ignored files and directories: Introduced a feature to exclude specific files and directories during updates. For instance, the ios and android directories can now be ignored, as they are no longer pushed to the repository.

Who/what does this impact?

New and current users of the template. Please read instructions in .github/project-workflows/sync-with-template.yml to setup the new workflow.

How did you test this?

I created a private fork of the template, pushed the new workflow to the master branch (so it can be used) and tested different scenarios.

@asdolo asdolo self-assigned this Nov 28, 2024
Copy link

github-actions bot commented Nov 28, 2024

💯 Test Coverage

Lines Statements Branches Functions
Coverage: 51%
50.79% (257/506) 46.15% (102/221) 36.12% (69/191)

😎 Tests Results

Tests Skipped Failures Errors Time
68 0 💤 0 ❌ 0 🔥 28.105s ⏱️
👀 Tests Details • (51%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files50.7946.1536.1251.76 
report-only-changed-files is enabled. No files were changed in this commit :)

@asdolo asdolo force-pushed the feat/upstream_sync_workflow_v2 branch 28 times, most recently from 6faaa91 to 2409f24 Compare December 2, 2024 13:22
@asdolo asdolo force-pushed the feat/upstream_sync_workflow_v2 branch 4 times, most recently from 20e5b54 to cd015a7 Compare December 2, 2024 14:08
@asdolo asdolo marked this pull request as ready for review December 2, 2024 14:10
@asdolo asdolo requested a review from a team as a code owner December 2, 2024 14:10
Copy link
Collaborator

@fernandatoledo fernandatoledo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think a check to validate if the template-version input is a valid version string?

@asdolo
Copy link
Collaborator Author

asdolo commented Dec 2, 2024

Do you think a check to validate if the template-version input is a valid version string?

@fernandatoledo I tried with an invalid string ("hello") and the whole workflow just fails saying "fatal: couldn't find remote ref hello", which is what we want. What do you think?

@asdolo asdolo force-pushed the feat/upstream_sync_workflow_v2 branch from cd015a7 to 4c6ee6b Compare December 2, 2024 20:10
@asdolo asdolo merged commit 89b90d4 into master Dec 4, 2024
8 checks passed
@asdolo asdolo deleted the feat/upstream_sync_workflow_v2 branch December 4, 2024 13:19
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.

3 participants