mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
reduce triggers when unneeded (#3915)
This commit is contained in:
parent
fd02f72caf
commit
689c53fbc3
2 changed files with 17 additions and 7 deletions
21
.github/workflows/models_completeness.yml
vendored
21
.github/workflows/models_completeness.yml
vendored
|
|
@ -3,10 +3,6 @@ name: Issue Completeness Check
|
|||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
filters:
|
||||
- if: >
|
||||
!contains(github.event.issue.labels.*.name, 'enhancement') &&
|
||||
!contains(github.event.issue.title, 'Feature Request')
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
|
@ -16,7 +12,20 @@ jobs:
|
|||
check-completeness:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if should skip
|
||||
uses: actions/github-script@v8
|
||||
id: check-skip
|
||||
with:
|
||||
script: |
|
||||
const title = context.payload.issue.title.toLowerCase();
|
||||
const labels = context.payload.issue.labels.map(label => label.name);
|
||||
const hasFeatureRequest = title.includes('feature request');
|
||||
const hasEnhancement = labels.includes('enhancement');
|
||||
const shouldSkip = hasFeatureRequest && hasEnhancement;
|
||||
core.setOutput('should_skip', shouldSkip);
|
||||
|
||||
- name: Check issue completeness
|
||||
if: steps.check-skip.outputs.should_skip != 'true'
|
||||
uses: actions/ai-inference@v2
|
||||
id: ai
|
||||
with:
|
||||
|
|
@ -27,10 +36,10 @@ jobs:
|
|||
Body: ${{ github.event.issue.body }}
|
||||
system-prompt: You are a helpful assistant that helps analyze GitHub issues for completeness.
|
||||
model: openai/gpt-4o-mini
|
||||
temperature: 0.2
|
||||
# temperature: 0.2
|
||||
|
||||
- name: Comment on issue
|
||||
if: steps.ai.outputs.response != ''
|
||||
if: steps.check-skip.outputs.should_skip != 'true' && steps.ai.outputs.response != ''
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
|
|
|
|||
3
.github/workflows/models_quality.yml
vendored
3
.github/workflows/models_quality.yml
vendored
|
|
@ -14,6 +14,7 @@ permissions:
|
|||
jobs:
|
||||
quality-check:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'issues' || (github.event_name == 'pull_request' && github.event.pull_request.labels == null || !contains(join(github.event.pull_request.labels.*.name, ','), 'automation')) }}
|
||||
steps:
|
||||
- name: Detect spam or low-quality content
|
||||
uses: actions/ai-inference@v2
|
||||
|
|
@ -28,7 +29,7 @@ jobs:
|
|||
Respond with one of: spam, ai-generated, needs-review, or ok
|
||||
system-prompt: You detect spam and low-quality contributions. Be conservative - only flag obvious spam or AI slop.
|
||||
model: openai/gpt-4o-mini
|
||||
temperature: 0.1
|
||||
# temperature: 0.1
|
||||
|
||||
- name: Apply label if needed
|
||||
if: steps.ai.outputs.response != 'ok'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue