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

New/Update-GitHubRepository: Add Support for delete_branch_on_merge API Property #189

Closed
X-Guardian opened this issue May 28, 2020 · 2 comments · Fixed by #192
Closed

New/Update-GitHubRepository: Add Support for delete_branch_on_merge API Property #189

X-Guardian opened this issue May 28, 2020 · 2 comments · Fixed by #192
Labels
api completeness This is basic API functionality that hasn't been implemented yet. api-repositories Work to complete the API's defined here: https://developer.github.com/v3/repos/ help wanted Anyone in the community is welcome to do this work up for grabs Anyone in the community is welcome to do this work

Comments

@X-Guardian
Copy link
Contributor

X-Guardian commented May 28, 2020

Description

The GitHub Create/Update Repository APIs have a delete_branch_on_merge property which is not currently supported by the New-GitHubRepository and Update-GitHubRepository functions. This allows automatically deleting of head branches when pull requests are merged within the repo.

Proposal

Add a DeleteBranchOnMerge switch parameter to both functions to add support for this feature.

API Detail

delete_branch_on_merge | boolean | Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. Default: `false`.
@HowardWolosky HowardWolosky added api completeness This is basic API functionality that hasn't been implemented yet. api-repositories Work to complete the API's defined here: https://developer.github.com/v3/repos/ labels May 28, 2020
@HowardWolosky
Copy link
Member

Makes sense to me. We should also make sure that there aren't any other options that the functions are missing, for completness.

@HowardWolosky HowardWolosky added help wanted Anyone in the community is welcome to do this work up for grabs Anyone in the community is welcome to do this work labels May 28, 2020
@X-Guardian
Copy link
Contributor Author

Looking at the GitHub Repositories REST API Docs, the Create/Update APIs also have the visibility and is_template parameters which are not currently supported by the GitHubRepository functions.

API Detail

Parameter Type Description
visibility string Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. For more information, see "Creating an internal repository" in the GitHub Help documentation. The visibility parameter overrides the private parameter when you use both parameters with the nebula-preview preview header.
is_template boolean Either true to make this repo available as a template repository or false to prevent it. Default: false.

HowardWolosky pushed a commit that referenced this issue Jun 9, 2020
This PR adds the following parameters to the `New-GitHubRepository` and `Update-GitHubRepository` functions:

- DeleteBranchOnMerge
- IsTemplate

It also adds substantial UT's to verify these changes.

Fixes #189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api completeness This is basic API functionality that hasn't been implemented yet. api-repositories Work to complete the API's defined here: https://developer.github.com/v3/repos/ help wanted Anyone in the community is welcome to do this work up for grabs Anyone in the community is welcome to do this work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants