Repository navigation
feat(web): add attested Selfie Check embedding enrollment #761
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: Auto approve | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, ready_for_review, edited, labeled, unlabeled] | |
| issue_comment: | |
| types: [created, edited, deleted] | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: Pull request to review | |
| required: true | |
| type: number | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| select: | |
| if: >- | |
| (github.event_name == 'pull_request_target' && github.event.pull_request.base.ref == 'main') || | |
| (github.event_name == 'issue_comment' && github.event.issue.pull_request && | |
| !(github.event.sender.login == 'wld-walletkit-bot' && startsWith(github.event.comment.body, '<!-- walletkit-auto-approval-report -->'))) || | |
| (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| outputs: | |
| pr: ${{ steps.select.outputs.pr }} | |
| steps: | |
| - name: Select pull request | |
| id: select | |
| run: | | |
| python3 - <<'PY' | |
| import json, os | |
| event = json.load(open(os.environ['GITHUB_EVENT_PATH'])) | |
| kind = os.environ['GITHUB_EVENT_NAME'] | |
| if kind == 'workflow_dispatch': | |
| pr = int(event['inputs']['pr_number']) | |
| elif kind == 'issue_comment': | |
| pr = event['issue']['number'] | |
| else: | |
| pr = event['pull_request']['number'] | |
| if type(pr) is not int or pr <= 0: | |
| raise ValueError('PR number must be a positive integer') | |
| with open(os.environ['GITHUB_OUTPUT'], 'a') as output: | |
| output.write('pr=' + str(pr) + '\n') | |
| PY | |
| review: | |
| needs: select | |
| uses: ./.github/workflows/review-for-approval.yml | |
| with: | |
| pr_number: ${{ fromJSON(needs.select.outputs.pr) }} | |
| secrets: | |
| OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }} | |
| APPROVAL_TOKEN: ${{ secrets.WALLETKIT_BOT_TOKEN }} |