diff --git a/.github/workflows/sync-template.yml b/.github/workflows/sync-template.yml deleted file mode 100644 index a7868ed7..00000000 --- a/.github/workflows/sync-template.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Sync branch to template - -on: - workflow_dispatch: - schedule: - - cron: "14 0 1 * *" - -jobs: - sync: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Get GitHub App token - uses: tibdex/github-app-token@v1.7.0 - id: get_installation_token - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - - - name: Sync branch to template - env: - GH_TOKEN: ${{ steps.get_installation_token.outputs.token }} - run: | - branch_name=$(git rev-parse --abbrev-ref HEAD) - original_remote=$(git remote get-url origin) - pr_branch="sync-template/${branch_name}" - git config --global user.email "ubiquity-os[bot]@users.noreply.github.com" - git config --global user.name "ubiquity-os[bot]" - - git remote add template https://github.com/ubiquity/ts-template.git - git fetch template - - git checkout -b "$pr_branch" - - last_sync=$(git log --grep="Sync template" --format="%H" -n 1) - - if [ -n "$last_sync" ]; then - # If there's a previous sync, try to cherry-pick new changes - if ! git cherry-pick $last_sync..template/main; then - # If cherry-pick fails, abort and try a merge instead - git cherry-pick --abort - git merge template/main --no-commit - fi - else - # If it's the first sync, merge the template - git merge template/main --allow-unrelated-histories --no-commit - fi - - # Check if there are any changes - if git diff --staged --quiet && git diff --quiet; then - echo "No changes to sync from template." - exit 0 - fi - - # Commit changes, even if there are conflicts - git commit -am "chore: sync template (with potential conflicts)" || true - - # Push changes and create PR - git push -f "$original_remote" "$pr_branch" - gh pr create --title "Sync branch to template (manual resolution required)" \ - --body "This pull request merges changes from the template repository. There may be conflicts that require manual resolution." \ - --head "$pr_branch" \ - --base "$branch_name" || true diff --git a/revert-pr-294.txt b/revert-pr-294.txt deleted file mode 100644 index 6c3e9e0d..00000000 --- a/revert-pr-294.txt +++ /dev/null @@ -1 +0,0 @@ -This file was created to revert PR #294 \ No newline at end of file