Skip to content

chore(repo): Add backport script#1959

Merged
LekoArts merged 5 commits into
mainfrom
lekoarts/sdk-878-add-backport-script
Oct 31, 2023
Merged

chore(repo): Add backport script#1959
LekoArts merged 5 commits into
mainfrom
lekoarts/sdk-878-add-backport-script

Conversation

@LekoArts

@LekoArts LekoArts commented Oct 30, 2023

Copy link
Copy Markdown
Contributor

Description

This adds a backport script inside scripts. You'll be able to do:

cd scripts
node backport.mjs main-v4 1234

Example backport PR: #1958

If you have access to it, use the CLERK_COOKIE_PAT so that the bot user creates the PR.

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

@changeset-bot

changeset-bot Bot commented Oct 30, 2023

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: acb8ad6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread docs/PUBLISH.md

We're still considering whether switching the repo into a `canary` mode for big, experimental features makes sense. There is no use case for this right now, however, we might experiment with the [changesets prerelease mode](https://github.com/changesets/changesets/blob/main/docs/prereleases.md) in the future.

## Backporting PRs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lemme know if you'd want any more details on this for that section

Comment thread scripts/backport.mjs
owner,
repo,
issue_number: pr.data.number,
labels: [`cherry`],

@LekoArts LekoArts Oct 30, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short-form of "cherry-picking"

@nikosdouvlis nikosdouvlis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LekoArts Good job automating this one :) Do you think we could turn this into a GH workflow using the workflow_dispatch trigger so it can be manually triggered while also accepting inputs?

Or maybe even going a bit further, another similar idea would be to create a special tag (eg backport) and have your script run after merge for every tagged PR

@LekoArts

Copy link
Copy Markdown
Contributor Author

The script in its current form wouldn't be ready for that as it doesn't handle any error cases / things besides the happy path. Once you have merge conflicts the script won't finish successfully so it's better to run this locally so that you can also resolve it locally directly.

@LekoArts
LekoArts enabled auto-merge October 31, 2023 06:49
@LekoArts
LekoArts added this pull request to the merge queue Oct 31, 2023
Merged via the queue into main with commit 757166c Oct 31, 2023
@LekoArts
LekoArts deleted the lekoarts/sdk-878-add-backport-script branch October 31, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants