Skip to content

Commit b6ebc9b

Browse files
committed
Merge remote-tracking branch 'upstream/2.x' into amacrobert-meq--952-integration-doc-update
* upstream/2.x: Correctly link to github actions docs and fix backlinks Improved bc check bug KnpLabs#979 Deployments: use proper media-type for in_progress/queued, inactive state (staabm)
2 parents 25ba522 + fd4d2a8 commit b6ebc9b

File tree

10 files changed

+48
-21
lines changed

10 files changed

+48
-21
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "BC check"
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
roave_bc_check:
8+
name: "Roave BC check"
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Roave BC Check
16+
uses: docker://nyholm/roave-bc-check-ga
17+
with:
18+
args: --from=${{ github.event.pull_request.base.sha }}

.github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ jobs:
2828
- name: Run phpunit
2929
run: vendor/bin/phpunit --verbose
3030

31-
roave_bc_check:
32-
name: Roave BC Check
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v2
36-
37-
- name: Roave BC Check
38-
uses: docker://nyholm/roave-bc-check-ga
39-
4031
phpstan:
4132
name: PHPStan
4233
runs-on: ubuntu-latest

doc/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ v3 APIs:
4848
* [Reviews](pull_request/reviews.md)
4949
* [Rate Limits](rate_limits.md)
5050
* [Repositories](repos.md)
51+
* Actions
52+
* [Artifacts](repo/actions/artifacts.md)
53+
* [Secrets](repo/actions/secrets.md)
54+
* [Self hosted runners](repo/actions/self_hosted_runners.md)
55+
* [Workflow jobs](repo/actions/workflow_jobs.md)
56+
* [Workflow runs](repo/actions/workflow_runs.md)
57+
* [Workflows](repo/actions/workflows.md)
5158
* [Check Runs](repo/check_runs.md)
5259
* [Check Suites](repo/check_suites.md)
5360
* [Contents](repo/contents.md)

doc/repo/actions/artifacts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Repo / Artifacts API
2-
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)
1+
## Repo / Actions / Artifacts API
2+
[Back to the "Repos API"](../../repos.md) | [Back to the navigation](../../README.md)
33

44
### List artifacts for a repository
55

doc/repo/actions/secrets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Repo / Secrets API
2-
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)
1+
## Repo / Actions / Secrets API
2+
[Back to the "Repos API"](../../repos.md) | [Back to the navigation](../../README.md)
33

44
### List repository secrets
55

doc/repo/actions/self_hosted_runners.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Repo / Self Hosted Runners API
2-
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)
1+
## Repo / Actions / Self Hosted Runners API
2+
[Back to the "Repos API"](../../repos.md) | [Back to the navigation](../../README.md)
33

44
# List self-hosted runners for a repository
55

doc/repo/actions/workflow_jobs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Repo / Workflow Jobs API
2-
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)
1+
## Repo / Actions / Workflow Jobs API
2+
[Back to the "Repos API"](../../repos.md) | [Back to the navigation](../../README.md)
33

44
### List jobs for a workflow run
55

doc/repo/actions/workflow_runs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Repo / Workflow Runs API
2-
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)
1+
## Repo / Actions / Workflow Runs API
2+
[Back to the "Repos API"](../../repos.md) | [Back to the navigation](../../README.md)
33

44
### List workflow runs for a repository
55

doc/repo/actions/workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Repo / Workflows API
2-
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)
1+
## Repo / Actions / Workflows API
2+
[Back to the "Repos API"](../../repos.md) | [Back to the navigation](../../README.md)
33

44
### List repository workflows
55

lib/Github/Api/Deployment.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
*/
1212
class Deployment extends AbstractApi
1313
{
14+
use AcceptHeaderTrait;
15+
1416
/**
1517
* List deployments for a particular repository.
1618
*
@@ -88,6 +90,15 @@ public function updateStatus($username, $repository, $id, array $params)
8890
throw new MissingArgumentException(['state']);
8991
}
9092

93+
// adjust media-type per github docs
94+
// https://docs.github.com/en/rest/reference/repos#create-a-deployment-status
95+
if ($params['state'] === 'inactive') {
96+
$this->acceptHeaderValue = 'application/vnd.github.ant-man-preview+json';
97+
}
98+
if ($params['state'] === 'in_progress' || $params['state'] === 'queued') {
99+
$this->acceptHeaderValue = 'application/vnd.github.flash-preview+json';
100+
}
101+
91102
return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments/'.$id.'/statuses', $params);
92103
}
93104

0 commit comments

Comments
 (0)