Skip to content

Transferring ownership article(s) should contain pointers to how/where transfer request can be approved #26501

Transferring ownership article(s) should contain pointers to how/where transfer request can be approved

Transferring ownership article(s) should contain pointers to how/where transfer request can be approved #26501

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@98814c53be79b1d30f795b907e553d8679345975
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: Label issues with new comments with 'triage'
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
if: ${{ steps.is-internal-contributor.outputs.result == 'false' }}
with:
add-labels: 'triage'
ignore-if-labeled: true
- name: Check out repo
if: ${{ failure() }}
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: ./.github/actions/slack-alert
if: ${{ failure() }}
with:
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}