PSGitLab icon indicating copy to clipboard operation
PSGitLab copied to clipboard

Are there any command for changing branch setting??

Open AkhilaDamera opened this issue 7 years ago • 7 comments

Hi,

After the project creation, I need to create the readme.md file, master branch and change the master branch setting to private/protected. Are there any commands available to initiate the repo and change the master branch settings??

Appreciate your response,

Thanks, akhila

AkhilaDamera avatar Aug 06 '18 13:08 AkhilaDamera

You have to create a repository, the README.md file locally, commit changes and push them to GitLab.

You can change the visibility of a project using Set-GitLabProject` function.

it-praktyk avatar Aug 06 '18 14:08 it-praktyk

I can add file locally and commit to GitLab, I need to automate the process of creating repository and adding the readme file. Do you have any functions available for this??

The Set-GitLabProject is for renaming correct? But,I need to change the branch permission under a repository.

AkhilaDamera avatar Aug 06 '18 14:08 AkhilaDamera

I can add file locally and commit to GitLab, I need to automate the process of creating repository and adding the readme file. Do you have any functions available for this??

Nope.

The GitLab Branches API is not implemented in the PSGitLab yet.

The Set-GitLabProject is for renaming correct?

Nope, the parameter Visibility is for that.

But,I need to change the branch permission under a repository.

Do you mean to protect a branch?

it-praktyk avatar Aug 06 '18 15:08 it-praktyk

Yes. I need to change the branch setting to protected and I believe that comes under the Branches API

AkhilaDamera avatar Aug 06 '18 15:08 AkhilaDamera

Any idea when would the PSGitLab support the Branches API feature??

AkhilaDamera avatar Aug 07 '18 14:08 AkhilaDamera

There is no roadmap. All additions/improvements are done by the community/public when motivated and available to do so.

robinmalik avatar Aug 09 '18 15:08 robinmalik

@it-praktyk and @robinmalik are correct. No timeline exists for support for the Branches API. My goal in the project was to cover the APIs I need but make it easy for others to add what they need.

I would welcome any addition from @AkhilaDamera to add support. I'd be more than happy to aid any attempt if you've never done anything like this.

ngetchell avatar Aug 16 '18 01:08 ngetchell