From db054a022143f4fecc48717de6d3df498edd65ab Mon Sep 17 00:00:00 2001 From: Daniel Haus Date: Thu, 2 May 2024 22:05:56 +0200 Subject: [PATCH 1/2] chore: add custom user-agent --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 5f537e7..deff38b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -56,7 +56,7 @@ async function obtainAccessToken( const response = await axios.post( endpoint.toString(), JSON.stringify(exchangeTokenRequest), - {httpsAgent: agent} + {httpsAgent: agent, headers: { 'User-Agent': 'central-login-action'}}, ) core.info( From afa048606c483aed8431dee745bb2ff79bac8e1f Mon Sep 17 00:00:00 2001 From: Daniel Haus Date: Sat, 4 May 2024 02:34:20 +0200 Subject: [PATCH 2/2] Address review comment --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index deff38b..4228890 100644 --- a/src/main.ts +++ b/src/main.ts @@ -56,7 +56,7 @@ async function obtainAccessToken( const response = await axios.post( endpoint.toString(), JSON.stringify(exchangeTokenRequest), - {httpsAgent: agent, headers: { 'User-Agent': 'central-login-action'}}, + {httpsAgent: agent, headers: { 'User-Agent': 'central-login-GHA'}}, ) core.info(