1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-13 13:48:59 +02:00
unleash.unleash/.github/workflows/ai-flag-cleanup.yml
Nuno Góis 1664c71b83
chore: AI flag cleanup action (#10274)
https://linear.app/unleash/issue/2-3662/explore-ai-flag-cleanup-through-a-gh-action

This builds upon:
 - https://github.com/Unleash/unleash/pull/10242
 - https://github.com/Unleash/unleash/pull/10249
 - https://github.com/Unleash/unleash/pull/10250
 - https://github.com/Unleash/unleash/pull/10254

...and **Henry**, our hackathon prototype.

This GH action automatically creates PRs to clean up flags marked as
completed.

See example: https://github.com/Unleash/unleash/pull/10273

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2025-07-02 10:53:14 +01:00

25 lines
661 B
YAML

name: AI flag cleanup
on:
issues:
types: [labeled]
workflow_dispatch:
inputs:
issue-number:
description: 'Flag completed issue number'
required: true
type: number
jobs:
flag-cleanup:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'issues' && github.event.label.name == 'unleash-flag-completed')
uses: ./.github/workflows/ai-flag-cleanup-pr.yml
with:
issue-number: ${{ github.event.issue.number || fromJson(inputs['issue-number']) }}
model: gemini
api_key_env_name: GEMINI_API_KEY
secrets:
api_key_env_value: ${{ secrets.GEMINI_API_KEY }}