ci(icons): Add ChatGPT tags suggestions on icon PRs (#3372)

* Add gpt tags

* Add github actions flow

* Add link so people can use the chat

* Fix workflow

* Add openai dep

* Add actions core

* Try gh pr review in actions

* Try with octokit

* Remove changed files part

* Try with createReview function

* Try this

* fix broken json file

* Turn on review by gh action

* Try this

* Update icons/trash.json

* Update the runner

* Remove added tags

* Add more checks
This commit is contained in:
Eric Fennis
2025-06-27 17:11:00 +02:00
committed by GitHub
parent 110d8cce27
commit 0e54626bdb
6 changed files with 366 additions and 2 deletions

View File

@@ -0,0 +1,33 @@
name: Pull request tags suggestions
on:
pull_request:
paths:
- 'icons/*.json'
jobs:
pull-request-tags-suggestions:
name: Pull Request Tags Suggestions
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version-file: 'package.json'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate comment markup
run: node ./scripts/suggestTags.mts
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}
COMMIT_SHA: ${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}