mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
feat: JobArtifacts.downloadArchive: Add support for search_recent_successful_pipelines (#3812)
Co-authored-by: Simon Heather <simon.heather@yulife.com>
This commit is contained in:
parent
227d803aeb
commit
ab47aa6548
@ -38,7 +38,13 @@ export class JobArtifacts<C extends boolean = false> extends BaseResource<C> {
|
||||
}: (
|
||||
| { jobId: number; artifactPath?: undefined; job?: undefined; ref?: undefined }
|
||||
| { jobId: number; artifactPath: string; job?: undefined; ref?: undefined }
|
||||
| { ref: string; job: string; jobId?: undefined; artifactPath?: undefined }
|
||||
| {
|
||||
ref: string;
|
||||
job: string;
|
||||
jobId?: undefined;
|
||||
artifactPath?: undefined;
|
||||
searchRecentSuccessfulPipelines?: boolean;
|
||||
}
|
||||
| { ref: string; job: string; artifactPath: string; jobId?: undefined }
|
||||
) & { jobToken?: string } & Sudo &
|
||||
ShowExpanded<E> = {} as any,
|
||||
|
||||
@ -108,6 +108,23 @@ describe('JobArtifacts.downloadArchive', () => {
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it('should request GET /projects/:id/jobs/artifacts/:ref/download?job=:name&search_recent_successful_pipelines=true when searchRecentSuccessfulPipelines is true', async () => {
|
||||
await service.downloadArchive(1, {
|
||||
job: 'job1',
|
||||
ref: 'ref1',
|
||||
searchRecentSuccessfulPipelines: true,
|
||||
});
|
||||
|
||||
expect(RequestHelper.get()).toHaveBeenCalledWith(
|
||||
service,
|
||||
`projects/1/jobs/artifacts/ref1/download`,
|
||||
{
|
||||
job: 'job1',
|
||||
searchRecentSuccessfulPipelines: true,
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('JobArtifacts.keep', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user