PowerShellForGitHub icon indicating copy to clipboard operation
PowerShellForGitHub copied to clipboard

New/Set-GitHubRepository: Add Support for `Allow Auto Merge` and `Use Squash PR Title As Default`

Open X-Guardian opened this issue 3 years ago • 1 comments

Feature Idea Summary

GitHub have added two new options to Repositories that could be added to the New-GitHubRepository and Set-GitHubRepository Cmdlets; 'Allow Auto Merge' and 'Use Squash PR Title as Default'.

Feature Idea Additional Details

References:
API Reference
  • https://docs.github.com/en/rest/repos/repos#create-an-organization-repository
  • https://docs.github.com/en/rest/repos/repos#update-a-repository
Parameters
  • allow_auto_merge
  • use_squash_pr_title_as_default

Requested Assignment

  • If possible, I would like to implement this.

X-Guardian avatar Jul 21 '22 16:07 X-Guardian

Sounds good. Thanks for bringing this up and coding the fix!

HowardWolosky avatar Jul 25 '22 18:07 HowardWolosky

Re-opening as the change was reverted for two reasons:

  1. AllowAutoMerge was not working on Set-GitHubRepository (appears to be a bug on the GitHub side, but I was simply unable to validate that the feature worked)
  2. use_squash_pr_title_as_default has been deprecated and is also not being respected in my tests. It appears that we need to migrate over to squash_merge_commit_title instead, which has different usage.

HowardWolosky avatar Dec 16 '22 01:12 HowardWolosky