@@ -20,7 +20,6 @@ interface EventContext {
2020 repo : string ;
2121 actor : string ;
2222 labelAdded ?: string ;
23- commentAuthorLogin ?: string ;
2423 reviewState ?: string ;
2524}
2625
@@ -186,15 +185,6 @@ export async function collectInput(
186185 } ;
187186
188187 const client = createAppClient ( ) ;
189- const botLogin = await getBotLogin ( client ) ;
190-
191- if (
192- botLogin &&
193- ( event . actor === botLogin || event . commentAuthorLogin === botLogin )
194- ) {
195- core . info ( `Skipping: triggered by bot (${ botLogin } )` ) ;
196- return null ;
197- }
198188
199189 const data = await getPrAutomationData ( client , {
200190 owner : ensuredEvent . owner ,
@@ -232,9 +222,10 @@ export async function collectInput(
232222}
233223
234224function getEventContext ( ) : RawEventContext {
235- const prNumberInput = core . getInput ( 'pr-number' ) ;
236- const labelAddedInput = core . getInput ( 'label-added' ) ;
237- const reviewStateInput = core . getInput ( 'review-state' ) ;
225+ const prNumberInput = core . getInput ( 'pr-number' ) || undefined ;
226+ const labelAddedInput = core . getInput ( 'label-added' ) || undefined ;
227+ const reviewStateInput = core . getInput ( 'review-state' ) || undefined ;
228+ const actorInput = core . getInput ( 'actor' ) || undefined ;
238229
239230 // Infer event type from inputs
240231 let eventName = github . context . eventName ;
@@ -253,15 +244,14 @@ function getEventContext(): RawEventContext {
253244 action,
254245 owner : github . context . repo . owner ,
255246 repo : github . context . repo . repo ,
256- actor : github . context . actor ,
247+ actor : actorInput ?? github . context . actor ,
257248 labelAdded :
258- labelAddedInput ||
249+ labelAddedInput ??
259250 ( github . context . payload . action === 'labeled'
260251 ? github . context . payload . label ?. name
261252 : undefined ) ,
262- commentAuthorLogin : github . context . payload . comment ?. user ?. login ,
263253 reviewState :
264- reviewStateInput ||
254+ reviewStateInput ??
265255 ( github . context . payload . review ?. state as string | undefined ) ,
266256 } ;
267257}
@@ -276,17 +266,6 @@ function getPrNumber() {
276266 return undefined ;
277267}
278268
279- async function getBotLogin (
280- client : ReturnType < typeof github . getOctokit > ,
281- ) : Promise < string | null > {
282- try {
283- const app = await client . rest . apps . getAuthenticated ( ) ;
284- return app . data . slug ? `${ app . data . slug } [bot]` : null ;
285- } catch {
286- return null ;
287- }
288- }
289-
290269async function listTeamMembers (
291270 client : ReturnType < typeof github . getOctokit > ,
292271 org : string ,
0 commit comments