github: make attempts optional in workflowRunURL

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-06-12 09:22:43 +02:00
parent 33d4b448ac
commit fe58cc26f5
3 changed files with 12 additions and 9 deletions

View File

@@ -97,7 +97,10 @@ describe('repository', () => {
describe('workflowRunURL', () => {
it('returns 2188748038', async () => {
expect(GitHub.workflowRunURL).toEqual('https://github.com/docker/actions-toolkit/actions/runs/2188748038/attempts/2');
expect(GitHub.workflowRunURL()).toEqual('https://github.com/docker/actions-toolkit/actions/runs/2188748038');
});
it('returns 2188748038 with attempts 2', async () => {
expect(GitHub.workflowRunURL(true)).toEqual('https://github.com/docker/actions-toolkit/actions/runs/2188748038/attempts/2');
});
});