Skip to content

WIP: Remove force push to Pantheon by preparing local history #34

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

Draft
wants to merge 44 commits into
base: 0.x
Choose a base branch
from

Conversation

stevector
Copy link
Collaborator

@stevector stevector commented Apr 10, 2025

This pull request removes the Git force push behavior.

  • To do that it adds the --no-git-force to the invocation of terminus -n build:env:create.
  • Making that change work, without breaking the push requires that the Git history in the CI container include the Git history present on Pantheon.
  • That change to prepare the local CI Git History is accomplished with scripts/prepare-repo.sh
  • To increase the confidence in that script, I've included some bats tests that create mock repos representing GitHub, the GitHub Actions Container, and Pantheon.

Here are site that consume this action that are working with this change:

Before merging this PR, someone else should check that it works on their own consuming repo.

Copy link
Contributor

@stevector-streaming stevector-streaming left a comment

Choose a reason for hiding this comment

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

Don't merge this PR until figuring out if #46 is working

@stevector
Copy link
Collaborator Author

Thanks @stevector-streaming. Yes, I had to correctly require the branch before Composer / the Terminus plugin manager would use the 3.x branch of Build Tools. That seems to be working now after 571f74f

This build on the main branch of our personal site did not include the --force flag on the git push. https://github.com/stevector/stevector-composed/actions/runs/14457587267/job/40543999158

Copy link
Contributor

@stevector-streaming stevector-streaming left a comment

Choose a reason for hiding this comment

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

Thanks @stevector for figuring out the issue with #46.

@stevector stevector changed the title Remove force push to Pantheon by preparing local history WIP: Remove force push to Pantheon by preparing local history Apr 15, 2025
@stevector
Copy link
Collaborator Author

I saw yesterday that Miriam's sample repo does use force pushing still. That reduces the urgency for me to get force pushing out. Also, I'm finding that getting it out in a way that accommodates all the permutations of repo patterns is even trickier than I anticipated (and I was expecting it to be tricky). I'd like to defer this work until we have a more coherent plan for the future of Build Tools.

@jazzsequence jazzsequence marked this pull request as draft May 6, 2025 19:06
@jazzsequence
Copy link
Collaborator

Setting back to Draft based on the last comment and failing deployments.

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