Skip to content

Clarify short title of "Using custom instructions to unlock the power of Copilot code review" #39792

Clarify short title of "Using custom instructions to unlock the power of Copilot code review"

Clarify short title of "Using custom instructions to unlock the power of Copilot code review" #39792

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 }}