Skip to content

Commit f201f44

Browse files
authored
Fix GitHub Actions bugs: invalid command handling, missing permissions, and deprecated merge strategy (#686)
1 parent 0bb144c commit f201f44

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/ArticlesAutoTranslate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ jobs:
206206
fi
207207
208208
# Merge main to get the raw article
209-
git merge --strategy=recursive --strategy-option=theirs main || true
209+
git merge -X theirs main || true
210210
211211
### Ensure language directory exists
212212
- name: Prepare language directory

.github/workflows/close-non-main-prs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ on:
88
jobs:
99
close-pr-if-not-main:
1010
runs-on: ubuntu-latest
11-
11+
permissions:
12+
pull-requests: write
13+
issues: write
14+
1215
steps:
1316
- name: Close PRs
1417
uses: actions/github-script@v7

scripts/validateCommand.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function main({ github, context, core }) {
3333
core.setOutput("target_status", result.targetStatus);
3434

3535
if (!result.isValid) {
36-
core.setFailed(
36+
core.warning(
3737
"Invalid command. The comment must start with /postedit or /review."
3838
);
3939
}

0 commit comments

Comments
 (0)