Skip to content

feat(github-actions): Add action to let gemini label issues automatically#3430

Merged
josephperrott merged 1 commit intoangular:mainfrom
thePunderWoman:gemini-issue-labeler
Feb 19, 2026
Merged

feat(github-actions): Add action to let gemini label issues automatically#3430
josephperrott merged 1 commit intoangular:mainfrom
thePunderWoman:gemini-issue-labeler

Conversation

@thePunderWoman
Copy link
Contributor

This adds a github action that looks at newly opened issues. Gemini should read the issue details and take a best guess at applying an area label for us.

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Feb 17, 2026
@thePunderWoman thePunderWoman force-pushed the gemini-issue-labeler branch 3 times, most recently from 12701e1 to 679572c Compare February 18, 2026 17:14
/** The issue data fetched from Github. */
issueData?: any;

constructor(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to make sure that any usage of this always revokes the token that gets created for it. Which in practice nothing else is going to construct this class, but better safe then sorry.

Suggested change
constructor(
private constructor(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: if we do this, unit testing is not an option due to the constructor being private.

Comment on lines 26 to 27
private githubContext: typeof context,
private coreService: typeof core,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we providing these are parameters for the constructor instead of just using them from the global imports.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For testing purposes so we can override them in setup.

Comment on lines 54 to 69
const prompt = `
You are a helper for an open source repository.
Your task is to allow the user to categorize the issue with an "area: " label.
The following is the issue title and body:

Title: ${this.issueData.title}
Body:
${this.issueData.body}

The available area labels are:
${Array.from(this.repoAreaLabels).join('\n')}

Based on the content, which area label is the best fit?
Respond ONLY with the exact label name (e.g. "area: core").
If you are strictly unsure or if multiple labels match equally well, respond with "ambiguous".
If no area label applies, respond with "none".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we tested out this prompt at all? It seems really generic and like we could provide more value if we were to provide access to the other issues within the repository so it knows what else is happening in whatever repository its running in.

Copy link
Contributor Author

@thePunderWoman thePunderWoman Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have not. I can run some tests. My only concern is the cost associated with it looking at the other issues each time, but if that's not a big deal, then sure.

@thePunderWoman thePunderWoman force-pushed the gemini-issue-labeler branch 3 times, most recently from a782941 to 75cdd93 Compare February 18, 2026 18:47
…ally

this adds a github action that looks at newly opened issues. Gemini should read the issue details and take a best guess at applying an area label for us.
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josephperrott josephperrott added the action: merge The PR is ready for merge by the caretaker label Feb 19, 2026
@josephperrott josephperrott merged commit c231d87 into angular:main Feb 19, 2026
8 checks passed
@josephperrott
Copy link
Member

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments