Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/check-translation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,24 @@ jobs:
membership = response.data;
} catch (error) {
if (error.status !== 404) {
const commentBody = `@${commenter} tried to approve. Error status is ${error.status}.`


await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody
});
throw error;
}
// 404 means user is not a member, membership stays null
}

if (membership && (membership.state === 'active')) {
// User is a team member, approve the translation
const commentBody = `✅ Translation job **approved** by @${commenter} (docs-maintainer team member).

🚀 The translation job will be triggered.
const commentBody = `@${commenter} tried to approve. Error status is ${error.status}.`

_Note: Translation job execution is configured separately._`;

await github.rest.issues.createComment({
owner: context.repo.owner,
Expand All @@ -238,9 +244,8 @@ jobs:
});
} else {
// User is not a team member
const commentBody = `@${commenter}, you do not have permission to approve translation jobs.
const commentBody = `@${commenter} tried to approve. Error status is ${error.status}.`

Only members of the \`StarRocks/docs-maintainer\` team can approve translations.`;

await github.rest.issues.createComment({
owner: context.repo.owner,
Expand Down
3 changes: 3 additions & 0 deletions docs/en/example4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Example 4

Hello
3 changes: 3 additions & 0 deletions docs/en/example5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Example 5

hi