Skip to content

Provide guidance for Jetbrains Gateway users on whether the plugin needs to be installed on the host, client, or both #37584

Provide guidance for Jetbrains Gateway users on whether the plugin needs to be installed on the host, client, or both

Provide guidance for Jetbrains Gateway users on whether the plugin needs to be installed on the host, client, or both #37584

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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.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/slack-alert
if: ${{ failure() }}
with:
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}