Skip to content

[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack #218

[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack

[Snyk] Upgrade: lodash, , , , , , , , , , react, react-dom, semver, , , node-fetch, , , , babel-loader, cheerio, cookie-parser, mkdirp, copy-webpack-plugin, cross-env, directory-tree, dotenv, express, express-rate-limit, express-timeout-handler, flat, github-slugger, js-yaml, gray-matter, helmet, hot-shots, html-entities, linkinator, liquidjs, lunr-languages, mini-css-extract-plugin, morgan, redis, resolve-url-loader, rimraf, rss-parser, sass, sass-loader, style-loader, uuid, webpack #218

name: Start new engineering PR workflow
# **What it does**:
# **Why we have it**:
# **Who does it impact**:
on:
pull_request_target:
types:
- opened
- reopened
jobs:
triage:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
runs-on: ubuntu-latest
continue-on-error: true
env:
DRAFT_COLUMN_ID: 10095775
REGULAR_COLUMN_ID: 10095779
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
continue-on-error: true
with:
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
script: |
// Only assign the engineering folks
try {
await github.teams.getMembershipForUserInOrg({
org: 'github',
team_slug: 'docs-engineering',
username: context.payload.sender.login,
});
} catch(err) {
return
}
// Set column ID
const column_id = context.payload.pull_request.draft
? process.env.DRAFT_COLUMN_ID
: process.env.REGULAR_COLUMN_ID
// Try to create the card on the GitHub Project
try {
await github.projects.createCard({
column_id: column_id,
content_type: 'PullRequest',
content_id: context.payload.pull_request.id
});
} catch(error) {
console.log(error);
}
// Try to set the author as the assignee
const owner = context.payload.repository.owner.login
const repo = context.payload.repository.name
try {
await github.issues.addAssignees({
owner: owner,
repo: repo,
issue_number: context.payload.pull_request.number,
assignees: [
context.payload.sender.login
]
});
} catch(error) {
console.log(error);
}