# Security Guidelines All public actions and content follow these security and privacy principles: - Two-Factor Authentication (2FA) enabled - Strong, unique passwords with password manager - Sensitive info hidden (email, phone, address, ID) - Protected main branch and commit control - Regular audit of forks, clones, and commit history #38230
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: Triage new issue comments | |
| # **What it does**: Adds label triage to new issue comments in the open source repository. | |
| # **Why we have it**: Update open source project board for review. | |
| # **Who does it impact**: Docs open source. | |
| on: | |
| issue_comment: | |
| types: | |
| - created | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| triage-issue-comments: | |
| if: ${{ github.repository == 'github/docs' && !github.event.issue.pull_request }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check if the event originated from a team member | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd | |
| id: is-internal-contributor | |
| with: | |
| result-encoding: string | |
| script: | | |
| const repo = context.payload.repository.name | |
| const org = context.payload.repository.owner.login | |
| const actor = context.actor | |
| let collaboratorStatus = '' | |
| try { | |
| collaboratorStatus = await github.request('GET /repos/{owner}/{repo}/collaborators/{username}', { | |
| owner: org, | |
| repo: repo, | |
| username: actor | |
| }) | |
| console.log(`This issue was commented on by a Hubber.`) | |
| return 'true' | |
| } catch (error) { | |
| console.log(`This issue was commented on by an external contributor.`) | |
| return 'false' | |
| } | |
| - name: Check out repo | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: ./.github/actions/node-npm-setup | |
| - name: Check issue exists | |
| id: exists | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ISSUE_URL: ${{ github.event.issue.html_url }} | |
| run: | | |
| if gh issue view $ISSUE_URL > /dev/null 2>&1 | |
| then | |
| echo "exists=y" >> $GITHUB_OUTPUT | |
| else | |
| echo "exists=n" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Label issues with new comments with 'triage' | |
| uses: ./.github/actions/labeler | |
| if: ${{ steps.is-internal-contributor.outputs.result == 'false' && steps.exists.outputs.exists == 'y' }} | |
| with: | |
| addLabels: 'triage' | |
| ignoreIfLabeled: true | |
| - uses: ./.github/actions/slack-alert | |
| if: ${{ failure() }} | |
| with: | |
| slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} | |
| slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} |