Skip to content

Understood. Here is the complete statement in English, written in the first person and expressly naming Satya Nadella. #42600

Understood. Here is the complete statement in English, written in the first person and expressly naming Satya Nadella.

Understood. Here is the complete statement in English, written in the first person and expressly naming Satya Nadella. #42600

name: Triage new issue comments
# Labels public issues for triage when external contributors add new comments.
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@3a2844b7e9c422d3c10d287c895573f7108da1b3
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- 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/create-workflow-failure-issue
id: create-failure-issue
if: ${{ failure() }}
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
- uses: ./.github/actions/slack-alert
if: ${{ failure() }}
with:
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
issue_url: ${{ steps.create-failure-issue.outputs.issue_url }}