Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:redwoodjs/redwood into rc-service-c…
…aching * 'main' of github.com:redwoodjs/redwood: (244 commits) chore(deps): update dependency @replayio/playwright to v0.3.0 (#6735) chore: update all contributors Update Clerk docs (#6712) Update firebase auth docs (#6717) Clerk: Simplify web implementation (#6713) Add auth decoder to clerk auth setup (#6718) Auth: Update firebase setup script (#6716) chore: Remove redundant space " " (#6714) Update the Clerk setup script and templates (#6710) Fix decouple auth related type errors (#6709) fix(deps): update dependency css-minimizer-webpack-plugin to v4.2.2 (#6688) fix(deps): update dependency @graphql-codegen/cli to v2.13.7 (#6687) feat: publish 2nd canary (@next) from release branch (#6505) fix: don't pr if can't cherry pick cleanly (#6703) fix(dbAuth): add required packages to setup command (#6698) Netlify: Enable auth-providers-api and auth-providers-web installation (#6697) chore: make misc change to trigger canary publishing (#6695) chore: remove private on new packages (#6692) chore: run lint fix (#6691) Decouple auth (#5985) ...
- Loading branch information
Showing
762 changed files
with
96,849 additions
and
10,744 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: Update all contributors | ||
description: Updates all contributors | ||
runs: | ||
using: node16 | ||
main: update_all_contributors.mjs |
72 changes: 72 additions & 0 deletions
72
.github/actions/update_all_contributors/update_all_contributors.mjs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { getExecOutput, exec } from '@actions/exec' | ||
|
||
const runAllContributors = (args) => { | ||
args = Array.isArray(args) ? args : [args] | ||
|
||
return getExecOutput('yarn', [ | ||
'run', | ||
'all-contributors', | ||
'--config=.all-contributorsrc', | ||
...args | ||
], { | ||
cwd: './tasks/all-contributors' | ||
}) | ||
} | ||
|
||
const ALL_CONTRIBUTORS_IGNORE_LIST = [ | ||
// core team | ||
'agiannelli', | ||
'ajcwebdev', | ||
'alicelovescake', | ||
'aldonline', | ||
'callingmedic911', | ||
'cannikin', | ||
'dac09', | ||
'dthyresson', | ||
'forresthayes', | ||
'jtoar', | ||
'kimadeline', | ||
'KrisCoulson', | ||
'mojombo', | ||
'noire-munich', | ||
'peterp', | ||
'realStandal', | ||
'RobertBroersma', | ||
'simoncrypta', | ||
'Tobbe', | ||
'thedavidprice', | ||
'virtuoushub', | ||
|
||
// bots | ||
'codesee-maps[bot]', | ||
'dependabot[bot]', | ||
'dependabot-preview[bot]', | ||
'redwoodjsbot', | ||
'renovate[bot]', | ||
] | ||
|
||
const { stdout } = await runAllContributors('check') | ||
|
||
const contributors = stdout | ||
.trim() | ||
.split('\n')[1] | ||
.split(',') | ||
.map((contributor) => contributor.trim()) | ||
.filter( | ||
(contributor) => !ALL_CONTRIBUTORS_IGNORE_LIST.includes(contributor) | ||
) | ||
|
||
if (contributors.length === 0) { | ||
console.log('No contributors to add') | ||
} else { | ||
for (const contributor of contributors) { | ||
await runAllContributors(['add', contributor, 'code']) | ||
} | ||
|
||
await runAllContributors(['generate', '--contributorsPerLine=5']) | ||
|
||
await exec('git', ['config', 'user.name', 'github-actions']) | ||
await exec('git', ['config', 'user.email', 'github-actions@github.com']) | ||
await exec('git', ['commit', '-am chore: update all contributors']) | ||
await exec('git', ['push']) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ | |
"pretty-bytes", | ||
"is-port-reachable", | ||
"pretty-ms", | ||
"camelcase" | ||
"camelcase", | ||
"sort-package-json" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# When a PR is merged into the main branch, this workflow tries to cherry pick the squashed commit into the next branch | ||
# by fast forwarding the next branch via the `--ff` option. | ||
# If that doesn't work (i.e. main and next have diverged), it'll open a PR against the next branch with the squashed commit. | ||
|
||
name: 🍒 Cherry pick into next branch | ||
|
||
on: | ||
pull_request_target: | ||
branches: [main] | ||
types: [closed] | ||
|
||
jobs: | ||
cherry-pick-fast-forward: | ||
# Don't cherry pick commits with breaking changes. | ||
if: ${{ github.event.pull_request.merged == true && !contains(github.event.pull_request.labels.*.name, 'release:feature-breaking') && !contains(github.event.pull_request.labels.*.name, 'skip-cherry-pick') }} | ||
name: ⏩ Cherry pick fast forward | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pr: ${{ steps.cherry-pick-fast-forward.outputs.value }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: next | ||
# git isn't able to work with $GITHUB_SHA if we don't checkout everything. | ||
fetch-depth: 0 | ||
# Since next is a protected branch, we need a token to run `git push` later. | ||
token: ${{ secrets.JTOAR_TOKEN }} | ||
|
||
- name: ⏩ Cherry pick fast forward | ||
id: cherry-pick-fast-forward | ||
run: | | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
# Here, $GITHUB_SHA is the last merge commit on the $GITHUB_REF branch. | ||
# That merge commit is already in the main branch at this point (this action runs on "pull_request closed" events). | ||
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request. | ||
echo "Trying to cherry pick $GITHUB_SHA" | ||
git cherry-pick --ff $GITHUB_SHA || exit 1 | ||
# If the HEAD of main and next point to the same commit, then the fast forward worked and we can go ahead and push. | ||
echo "Comparing SHAs" | ||
echo "main $(git rev-parse origin/main)" | ||
echo "next $(git rev-parse next)" | ||
if [[ "$(git rev-parse origin/main)" = "$(git rev-parse next)" ]]; then | ||
echo "SHAs are the same, pushing" | ||
git push | ||
else | ||
echo "SHAs are different" | ||
echo "value=true" >> $GITHUB_OUTPUT | ||
fi | ||
cherry-pick-into-next-pr: | ||
needs: cherry-pick-fast-forward | ||
if: ${{ needs.cherry-pick-fast-forward.outputs.pr == 'true' }} | ||
name: Cherry pick into next PR | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 🔑 Generate token | ||
id: generate_token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cherry pick into next PR | ||
uses: carloscastrojumo/github-cherry-pick-action@v1.0.3 | ||
with: | ||
# We specify a token because we want other workflows (like CI) to run on this PR. | ||
# If we omit this, it uses the default token (GITHUB_TOKEN) which doesn't trigger other workflows. | ||
token: ${{ steps.generate_token.outputs.token }} | ||
branch: next | ||
labels: cherry-pick | ||
|
||
comment-on-pr: | ||
needs: cherry-pick-into-next-pr | ||
if: failure() | ||
name: 💬 Comment on PR | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 🔑 Generate token | ||
id: generate_token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.PRIVATE_KEY }} | ||
|
||
- uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ steps.generate_token.outputs.token }} | ||
script: | | ||
await github.rest.issues.createComment({ | ||
issue_number: '${{ github.event.number }}', | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `🔔 @jtoar, @Tobbe—I couldn't cherry pick this one. If you want it in the next release, you'll have to cherry pick it manually.`, | ||
}); | ||
await github.rest.issues.addLabels({ | ||
issue_number: '${{ github.event.number }}', | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['needs-cherry-pick'] | ||
}) | ||
Oops, something went wrong.