app icon indicating copy to clipboard operation
app copied to clipboard

Support for Github Environments

Open niraj8 opened this issue 2 years ago • 3 comments

Prerequisites:

  • Is the functionality available in the GitHub UI? If so, please provide a link to information about the feature. https://github.com/{org}/{repo}/settings/environments
  • Is the functionality available through the GitHub API? If the functionality is available, please provide links to the API documentation (https://developer.github.com/v3/) as well as the Octokit documentation (https://octokit.github.io/).
  • https://docs.github.com/en/rest/deployments/environments
  • If the functionality is not yet available in the API, it would be helpful if you contacted support (https://support.github.com/) or posted in the Community Forum (https://github.community/). Please include a link to the forum post if you create one or a copy of the response from support.

New Feature

Please describe the desired new functionality: Add support to manage Github environments with settings.yml

niraj8 avatar Jul 05 '22 14:07 niraj8

Example settings.yml

  name: example-repo
  has_wiki: false
  ...

  branches:
    - name: main
      protection:
        ...

  environments:
    - name: dev
      reviewers: [] # or null
      protected_branches: null # set to null to allow deployments from all branches
    - name: prod
      reviewers: [ "@org/team", "user" ]
      protected_branches: true # deployments only from main branch allowed, in this example

Also whenever protected_branches is set to true, custom_branch_policies needs to be set to false. ref

Let me know if this looks good and I can try and put together a PR for this.

niraj8 avatar Jul 05 '22 18:07 niraj8

@gr2m wdyt?

niraj8 avatar Jul 08 '22 17:07 niraj8

@gr2m do you have any thoughts on this issue? thx

celliott avatar Jul 26 '22 17:07 celliott

:tada: This issue has been resolved in version 2.1.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Feb 02 '23 02:02 github-actions[bot]