Skip to content

Commit 78b58be

Browse files
committed
feat(actions): updated download example cases
Signed-off-by: Emre DEĞER <ben@emre.dev>
1 parent 698918d commit 78b58be

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

doc/repo/actions/artifacts.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ $client->api('repo')->artifacts()->delete('KnpLabs', 'php-github-api', $artifact
3939
https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#download-an-artifact
4040

4141
```php
42-
$client->api('repo')->artifacts()->download('KnpLabs', 'php-github-api', $artifactId, $format = 'zip');
42+
$artifactFile = $client->api('repo')->artifacts()->download('KnpLabs', 'php-github-api', $artifactId, $format = 'zip');
43+
file_put_contents($artifactId.'.'.$format, $artifactFile);
4344
```

doc/repo/actions/workflow_jobs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ $job = $client->api('repo')->workflowJobs()->all('KnpLabs', 'php-github-api', $j
2222
https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#download-job-logs-for-a-workflow-run
2323

2424
```php
25-
$client->api('repo')->workflowJobs()->downloadLogs('KnpLabs', 'php-github-api', $jobId);
25+
$jobLogs = $client->api('repo')->workflowJobs()->downloadLogs('KnpLabs', 'php-github-api', $jobId);
26+
file_put_contents('jobLogs.zip', $jobLogs);
2627
```

doc/repo/actions/workflow_runs.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ $workflowUsage = $client->api('repo')->workflowRuns()->usage('KnpLabs', 'php-git
6262
https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#download-workflow-run-logs
6363

6464
```php
65-
$client->api('repo')->workflowRuns()->downloadLogs('KnpLabs', 'php-github-api', $runId);
65+
$logs = $client->api('repo')->workflowRuns()->downloadLogs('KnpLabs', 'php-github-api', $runId);
66+
67+
file_put_contents('logs.zip', $logs);
6668
```
6769

6870
### Delete workflow run logs

0 commit comments

Comments
 (0)