
Product
A New Overview in our Dashboard
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
A CLI tool that automates the process of backporting commits.
A Github Action around The Backport Tool now exists. It makes it a breeze to get automatic backports when pull requests are merged.
The remaining documentation focuses on the Backport CLI tool (not the Github Action) although all configuration options apply to the Github Action too. The only difference is that the CLI tool is interactive and run manually locally, where the Github Action runs automatically.
npm install -g backport
After installation you should add an access token to the global config in ~/.backport/config.json
. See the documentation for how the access token is generated.
npm install backport
Add a project config to the root of your repository:
// .backportrc.json
{
// Required
"repoOwner": "elastic",
"repoName": "kibana",
// the branches available to backport to
"targetBranchChoices": ["main", "6.3", "6.2", "6.1", "6.0"],
// Optional: automatically merge backport PR
"autoMerge": true,
"autoMergeMethod": "squash",
// Optional: Automatically detect which branches a pull request should be backported to based on the pull request labels.
// In this case, adding the label "auto-backport-to-production" will backport the PR to the "production" branch
"branchLabelMapping": {
"^auto-backport-to-(.+)$": "$1"
}
}
Add personal access token to global config:
// ~/.backport/config.json
{
"accessToken": "ghp_very_secret"
}
Run:
npx backport
This will start an interactive prompt. You can use your keyboards arrow keys to choose options, <space>
to select checkboxes and <enter>
to proceed.
Backporting is the action of taking parts from a newer version of a software system [..] and porting them to an older version of the same software. It forms part of the maintenance step in a software development process, and it is commonly used for fixing security issues in older versions of the software and also for providing new features to older versions.
Source: https://en.wikipedia.org/wiki/Backporting
This tools is for anybody who is working on a codebase where they have to maintain multiple versions. If you manually cherry-pick commits from master and apply them to one or more branches, this tool might save you a lot of time.
backport
is a CLI tool that will let you backport commit(s) interactively and then cherry-pick and create pull requests automatically. backport
will perform all git operations in a temporary folder (~/.backport/repositories/
) separate from your working directory, thereby never interfering with any unstages changes your might have.
backport --pr 1337
backport --author john
backport --path src/plugins/chatbot
backport --pr-filter label:backport-v2
(will list commits from PRs with the label "backport-v2")backport --source-branch 7.x --branch master
(will forwardport from 7.x to master)backport --mainline
See CONTRIBUTING.md
FAQs
A CLI tool that automates the process of backporting commits
We found that backport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.