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

Add support for environments #2223

Merged
merged 6 commits into from Jun 13, 2023
Merged

Add support for environments #2223

merged 6 commits into from Jun 13, 2023

Conversation

alson
Copy link
Contributor

@alson alson commented Apr 20, 2022

Environments are a feature in Github that allows setting up deployment rules, like manual approval, per repository. Because they can only be configured per repository, this makes automating their management particularly important for many-repository micro-service application. This PR adds support for getting, creating, updating and deleting environments as documented here.

This partially implements the features requested by issue 2067 (environments, but not environment secrets).

@alson
Copy link
Contributor Author

alson commented Nov 23, 2022

The linter CI run failed, but the failure is that git is prompting for credentials to clone some packages from Gitlab. So that does not look related to my changes in any way, since I didn't touch the build or requirements files. Locally I get the same error with PyGithub:master.

@willejs
Copy link

willejs commented Feb 14, 2023

I would love to see this merged somehow!

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2023

Codecov Report

Patch coverage: 97.93% and project coverage change: -0.01 ⚠️

Comparison is base (7be3f76) 98.49% compared to head (0f68d01) 98.48%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2223      +/-   ##
==========================================
- Coverage   98.49%   98.48%   -0.01%     
==========================================
  Files         124      128       +4     
  Lines       12418    12612     +194     
==========================================
+ Hits        12231    12421     +190     
- Misses        187      191       +4     
Impacted Files Coverage Δ
github/EnvironmentDeploymentBranchPolicy.py 96.29% <96.29%> (ø)
github/EnvironmentProtectionRuleReviewer.py 96.96% <96.96%> (ø)
github/EnvironmentProtectionRule.py 97.36% <97.36%> (ø)
github/Environment.py 98.63% <98.63%> (ø)
github/Repository.py 97.13% <100.00%> (+0.03%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Paul-AUB
Copy link

Same, I'm very interested in this feature !

@alson alson force-pushed the master branch 2 times, most recently from 258e1a6 to 6f5c026 Compare May 31, 2023 13:58
Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

We are migrating away from .pyi files. Can you please merge all typing information from new .pyi files (so not Repository.pyi) into the corresponding .py files? This will help not building up tech debt.

@alson
Copy link
Contributor Author

alson commented Jun 5, 2023

@EnricoMi Thanks for your review! I merged the types into the .py files for the new files I created.

@alson alson requested a review from EnricoMi June 5, 2023 17:08
Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@EnricoMi EnricoMi merged commit 0384e2f into PyGithub:master Jun 13, 2023
7 checks passed
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

Successfully merging this pull request may close these issues.

None yet

5 participants