This repository was archived by the owner on Feb 25, 2026. It is now read-only.
feat: make Gateway API key more visible on profile page #374
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: pr-management | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| jobs: | |
| # kilocode_change start | |
| check-author: | |
| uses: ./.github/workflows/check-org-member.yml | |
| with: | |
| username: ${{ github.event.pull_request.user.login }} | |
| secrets: | |
| kilo-maintainer-app-id: ${{ secrets.KILO_MAINTAINER_APP_ID }} | |
| kilo-maintainer-app-secret: ${{ secrets.KILO_MAINTAINER_APP_SECRET }} | |
| check-duplicates: | |
| needs: check-author | |
| if: needs.check-author.outputs['is-member'] == 'false' | |
| # kilocode_change end | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Bun | |
| uses: ./.github/actions/setup-bun | |
| - name: Install dependencies | |
| run: bun install | |
| # kilocode_change start | |
| - name: Setup Kilo | |
| uses: ./.github/actions/setup-kilo | |
| # kilocode_change end | |
| - name: Build prompt | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| { | |
| echo "Check for duplicate PRs related to this new PR:" | |
| echo "" | |
| echo "CURRENT_PR_NUMBER: $PR_NUMBER" | |
| echo "" | |
| echo "Title: $(gh pr view "$PR_NUMBER" --json title --jq .title)" | |
| echo "" | |
| echo "Description:" | |
| gh pr view "$PR_NUMBER" --json body --jq .body | |
| } > pr_info.txt | |
| - name: Check for duplicate PRs | |
| env: | |
| # kilocode_change start | |
| KILO_API_KEY: ${{ secrets.KILO_API_KEY }} | |
| KILO_ORG_ID: ${{ secrets.KILO_ORG_ID }} | |
| # kilocode_change end | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| COMMENT=$(bun script/duplicate-pr.ts -f pr_info.txt "Check the attached file for PR details and search for duplicates") | |
| if [ "$COMMENT" != "No duplicate PRs found" ]; then | |
| gh pr comment "$PR_NUMBER" --body "_The following comment was made by an LLM, it may be inaccurate:_ | |
| $COMMENT" | |
| fi | |
| add-contributor-label: | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 # kilocode_change | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - name: Add Contributor Label | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const isPR = !!context.payload.pull_request; | |
| const issueNumber = isPR ? context.payload.pull_request.number : context.payload.issue.number; | |
| const authorAssociation = isPR ? context.payload.pull_request.author_association : context.payload.issue.author_association; | |
| if (authorAssociation === 'CONTRIBUTOR') { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: issueNumber, | |
| labels: ['contributor'] | |
| }); | |
| } |