mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-24 11:30:03 +01:00
CI: run translator in pull_request_target for comment access
This commit is contained in:
parent
c02a6184d3
commit
f0de61ca21
1 changed files with 4 additions and 4 deletions
8
.github/workflows/translation-ai-check.yml
vendored
8
.github/workflows/translation-ai-check.yml
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
name: AI Translation Check
|
name: AI Translation Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
paths:
|
paths:
|
||||||
|
|
@ -18,7 +18,7 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
review:
|
review:
|
||||||
name: Review Translation
|
name: Review Translation
|
||||||
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'issue_comment' && github.event.action == 'created' && github.event.issue.pull_request != null && github.event.comment.user.login == 'vaxerski' && github.event.comment.body == 'ai, please recheck' ) }}
|
if: ${{ github.event_name == 'pull_request_target' || (github.event_name == 'issue_comment' && github.event.action == 'created' && github.event.issue.pull_request != null && github.event.comment.user.login == 'vaxerski' && github.event.comment.body == 'ai, please recheck' ) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
OPENAI_MODEL: gpt-5-mini
|
OPENAI_MODEL: gpt-5-mini
|
||||||
|
|
@ -32,8 +32,8 @@ jobs:
|
||||||
- name: Determine PR number
|
- name: Determine PR number
|
||||||
id: pr
|
id: pr
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
|
||||||
echo "number=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
|
echo "number=${{ github.event.pull_request_target.number }}" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "number=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT"
|
echo "number=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue