Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into mini-css-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gatsbybot committed Dec 9, 2021
2 parents fe2bcc8 + 6b28b69 commit e22305b
Show file tree
Hide file tree
Showing 336 changed files with 16,261 additions and 15,457 deletions.
76 changes: 8 additions & 68 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ executors:
parameters:
image:
type: string
default: "14.17.0"
default: "14.15.0"
docker:
- image: cimg/node:<< parameters.image >>
environment:
Expand Down Expand Up @@ -63,7 +63,6 @@ aliases:
branches:
ignore:
- /docs.+/
- /blog.+/

test_template: &test_template
parallelism: 4
Expand Down Expand Up @@ -101,7 +100,6 @@ aliases:
ignore:
- master
- /docs.+/
- /blog.+/
requires:
- lint
- typecheck
Expand Down Expand Up @@ -231,19 +229,10 @@ jobs:
- run: yarn check-repo-fields

unit_tests_node14:
# GATSBY_EXPERIMENTAL_LMDB_INDEXES is not activated yet
executor:
name: node
image: "14.17.0"
<<: *test_template

unit_tests_node14_lmdb_store:
executor:
name: node
image: "14.17.0"
environment:
GATSBY_EXPERIMENTAL_LMDB_STORE: 1
GATSBY_EXPERIMENTAL_LMDB_INDEXES: 1
GATSBY_EXPERIMENTAL_PARALLEL_QUERY_RUNNING: 1
image: "14.15.0"
<<: *test_template

integration_tests_gatsby_source_wordpress:
Expand Down Expand Up @@ -494,32 +483,7 @@ jobs:
- run: git config --global user.name "GatsbyJS Bot"
- run: git config --global user.email "core-team@gatsbyjs.com"
- run: node scripts/gatsby-changelog-generator/update-and-open-pr.js

update_i18n_source:
executor: node
steps:
- checkout
- run: git config --global user.name "GatsbyJS Bot"
- run: git config --global user.email "core-team@gatsbyjs.com"
- run:
command: yarn
working_directory: ~/project/scripts/i18n
- run:
command: yarn run update-source
working_directory: ~/project/scripts/i18n

sync_translation_repo:
executor: node
steps:
- checkout
- run: git config --global user.name "GatsbyJS Bot"
- run: git config --global user.email "core-team@gatsbyjs.com"
- run:
command: yarn
working_directory: ~/project/scripts/i18n
- run:
command: yarn run-all sync
working_directory: ~/project/scripts/i18n
- run: yarn format:other

windows_unit_tests:
parallelism: 4
Expand All @@ -539,11 +503,11 @@ jobs:

- <<: *attach_to_bootstrap
- run:
name: Install node 14.17 and yarn
name: Install node 14.15.0 and yarn
command: |
nvm install 14.17.0
nvm alias default 14.17.0
nvm use 14.17.0
nvm install 14.15.0
nvm alias default 14.15.0
nvm use 14.15.0
choco install yarn
- run:
name: Rebuild packages for windows
Expand Down Expand Up @@ -585,17 +549,6 @@ jobs:
workflows:
version: 2

weekly-i18n-sync:
triggers:
- schedule:
cron: "0 1 * * 6"
filters:
branches:
only:
- master
jobs:
- sync_translation_repo

nightly-react-next:
triggers:
- schedule:
Expand Down Expand Up @@ -669,14 +622,6 @@ workflows:
- lint
- typecheck
- bootstrap
- unit_tests_node14_lmdb_store:
<<: *ignore_docs
# rebuild to get correct version of lmdb-store (compiled for node14 not node12)
npm_rebuild: true
requires:
- lint
- typecheck
- bootstrap
- integration_tests_gatsby_source_wordpress:
<<: *e2e-test-workflow
- integration_tests_node_manifest:
Expand Down Expand Up @@ -727,8 +672,3 @@ workflows:
branches:
only:
- master
- update_i18n_source:
filters:
branches:
only:
- master
1 change: 1 addition & 0 deletions .github/actions/format-stale-output/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!dist
63 changes: 63 additions & 0 deletions .github/actions/format-stale-output/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# format-stale-output

Format the output of actions/stale into something you can pass to pullreminders/slack-action as blocks.

## Inputs

### `staled-issues-prs`

Comes from [actions/stale](https://github.com/actions/stale).

### `closed-issues-prs`

Comes from [actions/stale](https://github.com/actions/stale).

## Outputs

### `blocks`

Something you can directly pass to [pullreminders/slackaction](https://github.com/abinoda/slack-action) like:

```yaml
- name: Slack Report Closed Issues
uses: pullreminders/slack-action@v1.0.7
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
with:
args: '{\"channel\": \"${{ secrets.SLACK_STALE_CHANNEL_ID }}\", \"text\": \"\", \"blocks\": ${{ steps.format-stale-output.outputs.blocks }} }'
```
## Example Usage
```yaml
name: Stale Bot
on:
schedule:
- cron: "0 */12 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
name: stale
id: stale
with:
days-before-stale: 20
days-before-close: 40
- name: Format Stale Output
id: format-stale-output
uses: ./.github/actions/format-stale-output
with:
staled-issues-prs: ${{ steps.stale.outputs.staled-issues-prs }}
closed-issues-prs: ${{ steps.stale.outputs.closed-issues-prs }}
- name: Slack Report Closed Issues
uses: pullreminders/slack-action@v1.0.7
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
with:
args: '{\"channel\": \"${{ secrets.SLACK_STALE_CHANNEL_ID }}\", \"text\": \"\", \"blocks\": ${{ steps.format-stale-output.outputs.blocks }} }'
```
## Building this Action
Use [`@vercel/ncc`](https://github.com/vercel/ncc) to compile this action. You can run `npm run build` in this directory to run the command.
15 changes: 15 additions & 0 deletions .github/actions/format-stale-output/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Format Stale output
description: Format the output of actions/stale into something you can pass to pullreminders/slack-action as blocks
inputs:
staled-issues-prs:
description: List of all staled issues and pull requests.
required: true
closed-issues-prs:
description: List of all closed issues and pull requests.
required: true
outputs:
blocks:
description: Contents you can pass into "blocks" of slack-action
runs:
using: "node12"
main: "dist/index.js"
Loading

0 comments on commit e22305b

Please sign in to comment.