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

Prevent squash and merge for new repos #476

Open
alexanderleegs opened this issue Mar 11, 2022 · 0 comments
Open

Prevent squash and merge for new repos #476

alexanderleegs opened this issue Mar 11, 2022 · 0 comments

Comments

@alexanderleegs
Copy link
Contributor

Some repos have encountered issues because agency users mistakenly used squash and merge to merge changes on their staging branch to master - this could potentially cause merge conflicts because squash and merge creates an entirely new commit instead of preserving the existing commits, so a squashed commit is treated as different from what already exists on staging. To rectify this, we should ban squash and merge for new repos, since new repos should be using the cms and have no need for branches off staging.

We can do this by adding
allow_squash_merge: true
as a parameter to the create request:

octokit.repos.createInOrg({
      org: 'isomerpages',
      name: repoName,
      description: `Staging: https://${repoName}-staging.netlify.app | Production: https://${repoName}-prod.netlify.app`,
      private: false,
    }),
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

No branches or pull requests

1 participant