diff --git a/.github/workflows/move-new-issues-to-correct-docs-repo.yml b/.github/workflows/move-new-issues-to-correct-docs-repo.yml deleted file mode 100644 index 5317c532fa9d..000000000000 --- a/.github/workflows/move-new-issues-to-correct-docs-repo.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Move new issues to correct docs repo - -# **What it does**: If anyone creates an issue in the docs-internal repo for the engineering team or the content team, move that issue and notify the author -# **Why we have it**: We don't want engineering or content issues in the docs-internal repo -# **Who does it impact**: GitHub staff. - -on: - issues: - types: - # Note, if an issue is transferred from github/some-other-repo - # over to github/docs-internal, this will trigger both 'transferred' - # *and* 'opened' events. And 'opened' covers the most basic case - # of an issue being created here in this repo. - - opened - - reopened - -permissions: - contents: read - -jobs: - transfer_issue: - runs-on: ubuntu-latest - continue-on-error: true - if: github.repository == 'github/docs-internal' - steps: - - id: move_to_correct_repo - uses: actions/github-script@e69ef5462fd455e02edcaf4dd7708eda96b9eda0 - env: - TEAM_ENGINEERING_REPO: ${{ secrets.TEAM_ENGINEERING_REPO }} - TEAM_CONTENT_REPO: ${{ secrets.TEAM_CONTENT_REPO }} - with: - github-token: ${{ secrets.DOCS_BOT_PAT_WORKFLOW_READORG }} - script: | - const issueNo = context.issue.number - const owner = 'github' - const originalRepo = 'docs-internal' - - // See if the engineering label is present. - const engineeringLabel = context.payload.issue.labels.find(label => label.name === 'engineering') - - // Transfer engineering issues to the engineering repo and everything else to the Docs Content repo - let correctRepo = process.env.TEAM_CONTENT_REPO - if (engineeringLabel) { - correctRepo = process.env.TEAM_ENGINEERING_REPO - } - - const correctRepoObject = await github.rest.repos.get({ - owner: owner, - repo: correctRepo - }) - - // Post a comment in the docs-internal issue - await github.rest.issues.createComment({ - owner: owner, - repo: originalRepo, - issue_number: issueNo, - body: `👋 You opened this issue in '${context.repo.repo}'. Moving forward, we're asking that folks create new issues in the following repositories instead:\n- For issues with the docs site, please submit to the [${process.env.TEAM_ENGINEERING_REPO}](/${owner}/${process.env.TEAM_ENGINEERING_REPO}) repo.\n- For all new content issues, please submit to the [${process.env.TEAM_CONTENT_REPO}](/${owner}/${process.env.TEAM_CONTENT_REPO}) repo.\n\nWe will transfer this issue for you!` - }) - - // Transfer the issue to the correct repo - const issueNodeId = context.payload.issue.node_id - const correctRepositoryNodeId = correctRepoObject.data.node_id - console.log(`Issue GraphQL Node ID: ${issueNodeId}`) - console.log(`Repository GraphQL Node ID: ${correctRepositoryNodeId}`) - - const mutation = `mutation ($id: ID!, $repositoryId: ID!) { - transferIssue(input: { - issueId: $id, - repositoryId: $repositoryId - }) { - issue { - url, - number - } - } - }` - - const variables = { - id: issueNodeId, - repositoryId: correctRepositoryNodeId - } - - const graph = await github.graphql(mutation, variables) - console.log('GraphQL mutation result:\n' + JSON.stringify(graph)) - - // Add the same labels to the new issue - const newIssueNumber = graph.transferIssue.issue.number - await github.rest.issues.addLabels({ - owner: owner, - repo: correctRepo, - issue_number: newIssueNumber, - labels: context.payload.issue.labels.map(label => label.name), - }) - - - name: Check out repo - if: ${{ failure() }} - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: ./.github/actions/slack-alert - if: ${{ failure() }} - with: - slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} - slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} diff --git a/package-lock.json b/package-lock.json index e011e0e95adc..8c1e31bee728 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@primer/css": "^21.3.1", "@primer/octicons": "^19.9.0", "@primer/octicons-react": "^19.9.0", - "@primer/react": "36.20.0", + "@primer/react": "36.21.0", "accept-language-parser": "^1.5.0", "ajv": "^8.16.0", "ajv-errors": "^3.0.0", @@ -1387,8 +1387,9 @@ "license": "MIT" }, "node_modules/@github/relative-time-element": { - "version": "4.2.3", - "license": "MIT" + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@github/relative-time-element/-/relative-time-element-4.4.2.tgz", + "integrity": "sha512-wTXunu3hmuGljA5CHaaoUIKV0oI35wno0FKJl2yqKplTRnsCA5bPNj4bDeVIubkuskql6jwionWLlGM1Y6QLaw==" }, "node_modules/@github/tab-container-element": { "version": "3.4.0", @@ -2687,14 +2688,14 @@ "integrity": "sha512-/3lNloWONQMiasMAmJl5b85tP86e4uElU1d+kQQOBoVoXttni98DEigqQrKgIdwWaEcbp43IU2ks/9EZdwM2XA==" }, "node_modules/@primer/react": { - "version": "36.20.0", - "resolved": "https://registry.npmjs.org/@primer/react/-/react-36.20.0.tgz", - "integrity": "sha512-UBKsbwFpve0nQFciWWjOkwKch1H9nuo/WuaT6rP32c+WnJ1xbXS0FnPsn/LkPjypfUbRPqBb6BUM8leNTKcriA==", + "version": "36.21.0", + "resolved": "https://registry.npmjs.org/@primer/react/-/react-36.21.0.tgz", + "integrity": "sha512-Z/PHXknBj7bn0L3b2XZE3YEGzL0/IXkTYKuDr8ZqY8to6bwRj2kjRe7fg/NvZpgl5E9BLAsjs0Q0mSTruT68vA==", "dependencies": { "@github/combobox-nav": "^2.1.5", "@github/markdown-toolbar-element": "^2.1.0", "@github/paste-markdown": "^1.4.0", - "@github/relative-time-element": "^4.1.2", + "@github/relative-time-element": "^4.4.1", "@github/tab-container-element": "^4.8.0", "@lit-labs/react": "1.2.1", "@oddbird/popover-polyfill": "^0.3.1", diff --git a/package.json b/package.json index d44e31bb3dc1..9285374e29c1 100644 --- a/package.json +++ b/package.json @@ -232,7 +232,7 @@ "@primer/css": "^21.3.1", "@primer/octicons": "^19.9.0", "@primer/octicons-react": "^19.9.0", - "@primer/react": "36.20.0", + "@primer/react": "36.21.0", "accept-language-parser": "^1.5.0", "ajv": "^8.16.0", "ajv-errors": "^3.0.0",