Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6db9296

Browse files
authored
Merge pull requestsigmavirus24#1074 from greggilbert/feature/add-deployment-statuses
Allow more deployment statuses per Github docs
2 parents1d27cfe +40b9f2e commit6db9296

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

‎AUTHORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,5 @@ Contributors
210210
- Thomas Lam (@lamcw)
211211

212212
- David Glick (@davisagli)
213+
214+
- Greg Gilbert (@greggilbert)

‎docs/source/release-notes/3.2.0.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
3.2.0: 2022-xx-xx
2+
-----------------
3+
4+
Dependency Change
5+
`````````````````
6+
7+
8+
Features Added
9+
``````````````
10+
11+
- Added more allowed statuses to Deployments for
12+
:meth:`github3.repos.deployment.Deployment.create_status()`
13+
14+
15+
Bug Fixes
16+
`````````

‎docs/source/release-notes/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ here with the newest releases first.
99
==================
1010

1111
..toctree::
12+
3.2.0
1213
3.1.0
1314
3.0.0
1415

‎src/github3/repos/deployment.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def create_status(self, state, target_url=None, description=None):
7777
7878
:param str state:
7979
(required), The state of the status. Can be one of
80-
``pending``, ``success``, ``error``, or ``failure``.
80+
``pending``, ``success``, ``error``, ``inactive``,
81+
``in_progress``, ``queued``, or ``failure``.
8182
:param str target_url:
8283
The target URL to associate with this status.
8384
This URL should contain output to keep the user updated while the
@@ -92,7 +93,15 @@ def create_status(self, state, target_url=None, description=None):
9293
"""
9394
json=None
9495

95-
ifstatein ("pending","success","error","failure"):
96+
ifstatein (
97+
"pending",
98+
"success",
99+
"error",
100+
"inactive",
101+
"in_progress",
102+
"queued",
103+
"failure",
104+
):
96105
data= {
97106
"state":state,
98107
"target_url":target_url,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp