Skip to content

Commit

Permalink
Merge branch 'canary' into shu/8xwc
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding authored Feb 14, 2024
2 parents 21e5efb + 0c21654 commit a923cb3
Show file tree
Hide file tree
Showing 271 changed files with 8,779 additions and 10,569 deletions.
2 changes: 1 addition & 1 deletion .github/actions/next-repo-info/dist/prs/index.mjs

Large diffs are not rendered by default.

28 changes: 17 additions & 11 deletions .github/actions/next-repo-info/src/popular-prs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,30 @@ import { setFailed, info } from '@actions/core'
import { WebClient } from '@slack/web-api'

function generateBlocks(prs) {
let text = ''
let count = 0

const blocks = [
{
type: 'section',
text: {
type: 'mrkdwn',
text: '*A list of the top 15 PRs sorted by most :+1: reactions over the last 90 days.*\n_Note: This :github2: workflow will run every Monday at 1PM UTC (9AM EST)._',
},
},
{
type: 'divider',
},
]

let text = ''
prs.forEach((pr, i) => {
text += `${i + 1}. [<${pr.html_url}|#${pr.number}>, :+1: ${
pr.reactions['+1']
}]: ${pr.title}\n`
if (pr.reactions['+1'] > 1) {
text += `${i + 1}. [<${pr.html_url}|#${pr.number}>, :+1: ${
pr.reactions['+1']
}]: ${pr.title}\n`
count++
}
})

blocks.unshift({
type: 'section',
text: {
type: 'mrkdwn',
text: `*A list of the top ${count} PRs sorted by most :+1: reactions (> 1) over the last 90 days.*\n_Note: This :github2: workflow will run every Monday at 1PM UTC (9AM EST)._`,
},
})

blocks.push({
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/next-stats-action/src/run/collect-diffs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@ module.exports = async function collectDiffs(
filesToTrack.map(async (fileGroup) => {
const { globs } = fileGroup
const curFiles = []
const prettierExts = ['.js', '.html', '.css', '.json']

await Promise.all(
globs.map(async (pattern) => {
curFiles.push(...(await glob(pattern, { cwd: statsAppDir })))
curFiles.push(
...(await glob(pattern, { cwd: statsAppDir })).filter((item) =>
prettierExts.includes(path.extname(item))
)
)
})
)

Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,37 @@ jobs:
VERCEL_API_TOKEN: ${{ secrets.VERCEL_API_TOKEN }}
DEPLOY_ENVIRONMENT: production

deployTurbopackDocs:
name: Deploy Turbopack docs
runs-on: ubuntu-latest
needs: [build]
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 25
- name: Install Vercel CLI
run: npm i -g vercel@latest
- name: Install Rust
uses: ./.github/actions/setup-rust
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- uses: Swatinem/rust-cache@v2
- name: Deploy preview docs
if: ${{ needs.build.outputs.isRelease != 'true' }}
run: ./scripts/deploy-turbopack-docs.sh
env:
VERCEL_API_TOKEN: ${{ secrets.VERCEL_API_TOKEN }}
DEPLOY_ENVIRONMENT: preview
- name: Deploy production docs
if: ${{ github.ref_name == 'canary' || needs.build.outputs.isRelease == 'true' }}
run: ./scripts/deploy-turbopack-docs.sh
env:
VERCEL_API_TOKEN: ${{ secrets.VERCEL_API_TOKEN }}
DEPLOY_ENVIRONMENT: production

releaseStats:
name: Release Stats
runs-on:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@ jobs:
stepName: 'rust-check'
secrets: inherit

rust-doc-check:
name: rustdoc check
needs: ['changes', 'build-next']
if: ${{ needs.changes.outputs.docs-only == 'false' }}

uses: ./.github/workflows/build_reusable.yml
with:
needsRust: 'yes'
skipInstallBuild: 'yes'
skipNativeBuild: 'yes'
afterBuild: ./scripts/deploy-turbopack-docs.sh
stepName: 'rust-doc-check'
secrets: inherit

test-turbopack-dev:
name: test turbopack dev
needs: ['changes', 'build-next']
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ jobs:
with:
components: rustfmt, clippy

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
if: ${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
with:
mdbook-version: 'latest'

- name: 'Install mold linker'
if: ${{ inputs.mold == 'yes' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_popular.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Notify about the top 15 PRs (most reacted) in the last 90 days
name: Notify about the top PRs (most reacted) in the last 90 days

on:
schedule:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Nissuer
runs-on: ubuntu-latest
steps:
- uses: balazsorban44/nissuer@1.8.2
- uses: balazsorban44/nissuer@1.9.2
with:
label-area-prefix: 'area:'
label-area-section: 'Which area\(s\) are affected\? \(Select all that apply\)(.*)### Additional context'
Expand All @@ -34,4 +34,4 @@ jobs:
reproduction-blocklist: 'github.com/vercel/next.js.*,github.com/\\w*/?$,github.com$'
reproduction-link-section: '### Link to the code that reproduces this issue(.*)### To Reproduce'
reproduction-invalid-label: 'invalid link'
reproduction-issue-labels: 'template: bug'
reproduction-issue-labels: 'template: bug,'
Loading

0 comments on commit a923cb3

Please sign in to comment.