feat(github-actions): Add action to let gemini label issues automatically#3430
feat(github-actions): Add action to let gemini label issues automatically#3430thePunderWoman wants to merge 1 commit intoangular:mainfrom
Conversation
12701e1 to
679572c
Compare
| /** The issue data fetched from Github. */ | ||
| issueData?: any; | ||
|
|
||
| constructor( |
There was a problem hiding this comment.
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.
| constructor( | |
| private constructor( |
There was a problem hiding this comment.
Update: if we do this, unit testing is not an option due to the constructor being private.
| private githubContext: typeof context, | ||
| private coreService: typeof core, |
There was a problem hiding this comment.
Why are we providing these are parameters for the constructor instead of just using them from the global imports.
There was a problem hiding this comment.
For testing purposes so we can override them in setup.
| 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". |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
1e720b1 to
a782941
Compare
…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.
a782941 to
75cdd93
Compare
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.