[Snyk] Security upgrade express from 4.19.2 to 4.21.2 #11
This file contains 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**: | |
# **Why we have it**: | |
# **Who does it impact**: | |
on: | |
issue_comment: | |
types: | |
- created | |
jobs: | |
triage-issue-comments: | |
if: github.repository == 'github/docs' && github.event.issue.pull_request == null | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if the event originated from a team member | |
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d | |
id: is-internal-contributor | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
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: rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e | |
if: (steps.is-internal-contributor.outputs.result == 'false') | |
with: | |
repo-token: '${{ secrets.GITHUB_TOKEN }}' | |
add-labels: 'triage' | |
- name: Triage to project board | |
uses: rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9 | |
with: | |
action-token: ${{ secrets.GITHUB_TOKEN }} | |
project-url: 'https://github.com/github/docs/projects/1' | |
column-name: 'Triage' |