@@ -155,10 +155,16 @@ async function run() {
155155 const size = getSize ( data )
156156 const sizeType = findSingleSelectID ( size , 'Size' , data )
157157
158+ // Check if the author is a bot account (e.g. dependabot[bot], github-actions[bot]).
159+ // GitHub bot logins end with '[bot]' and cannot be resolved as regular GitHub users,
160+ // so we skip any user-specific GraphQL queries for them.
161+ const isBotAuthor = ( process . env . AUTHOR_LOGIN || '' ) . endsWith ( '[bot]' )
162+
158163 // If this is the OS repo, determine if this is a first time contributor
159164 // If yes, set the author to 'first time contributor' instead of to the author login
165+ // Bot accounts (e.g. dependabot[bot]) are not resolvable as GitHub users, so skip this check.
160166 let firstTimeContributor
161- if ( process . env . REPO === 'github/docs' ) {
167+ if ( ! isBotAuthor && process . env . REPO === 'github/docs' ) {
162168 const contributorData : Record < string , unknown > = await graphql (
163169 `
164170 query ($author: String!) {
@@ -242,8 +248,8 @@ async function run() {
242248
243249 // Determine which variable to use for the contributor type
244250 let contributorType
245- if ( isCopilotAuthor ) {
246- // Treat Copilot PRs as Docs team
251+ if ( isCopilotAuthor || isBotAuthor ) {
252+ // Treat Copilot and bot-authored PRs (e.g. dependabot[bot]) as Docs team
247253 contributorType = docsMemberTypeID
248254 } else if ( await isDocsTeamMember ( process . env . AUTHOR_LOGIN || '' ) ) {
249255 contributorType = docsMemberTypeID
0 commit comments