trigger #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Doc translation watchdog | |
| on: | |
| pull_request: | |
| paths: | |
| - 'docs/en/**' | |
| - 'docs/zh/**' | |
| - 'docs/ja/**' | |
| issue_comment: | |
| types: [created] | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| jobs: | |
| verify-membership: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get list of organization members | |
| env: | |
| MEMBERSHIP_TOKEN: ${{ secrets.MEMBERSHIP_TOKEN || secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Fetch the list of users in the organization | |
| DOCS_MAINTAINERS=$(curl -L \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer $MEMBERSHIP_TOKEN" \ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| https://api.github.com/orgs/starrocks/teams/docs-maintainer/members | jq -r '.[].login') | |
| # Save the allowlisted users in a file | |
| echo "$DOCS_MAINTAINERS" > allowlisted_users.txt | |
| cat allowlisted_users.txt | |