mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-04-24 20:32:14 +00:00
first README draft
This commit is contained in:
parent
4faf62d997
commit
a894e6404f
5 changed files with 105 additions and 4 deletions
27
.github/workflows/ci.yml
vendored
Normal file
27
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||||
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||||
|
|
||||||
|
name: CI Checks
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [16]
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
fail-fast: false
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup Node ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run test:report
|
2
.github/workflows/publish-gha.yml
vendored
2
.github/workflows/publish-gha.yml
vendored
|
@ -1,7 +1,7 @@
|
||||||
##
|
##
|
||||||
# Publish new action tag(s) for downstream consumption
|
# Publish new action tag(s) for downstream consumption
|
||||||
##
|
##
|
||||||
name: Publish
|
name: Publish GitHub Action
|
||||||
|
|
||||||
# Manual or automatic release
|
# Manual or automatic release
|
||||||
on:
|
on:
|
||||||
|
|
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Publish
|
name: Publish NPM Package
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
3
.github/workflows/pull-request.yml
vendored
3
.github/workflows/pull-request.yml
vendored
|
@ -15,9 +15,10 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Setup Node ${{ matrix.node-version }}
|
- name: Setup Node ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
- run: npm test
|
73
README.md
73
README.md
|
@ -0,0 +1,73 @@
|
||||||
|
<h1 align="center">BPER: Git Backporter</h1>
|
||||||
|
<h2 align="center">:outbox_tray: :inbox_tray:</h2>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/lampajr/backporting">
|
||||||
|
<img alt="GitHub Actions status" src="https://github.com/lampajr/backporting/workflows/CI/badge.svg">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**BPer** is a [NodeJS](https://nodejs.org/) command line tool that provides capabilities to *backport* [1] pull requests in an automated way. This tool also comes with a predefined GitHub action in order to make CI/CD integration easier for all users.
|
||||||
|
|
||||||
|
[1] *backporting* is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.
|
||||||
|
|
||||||
|
Table of content
|
||||||
|
----------------
|
||||||
|
|
||||||
|
* **[Usage](#usage)**
|
||||||
|
* **[GitHub Action](#github-action)**
|
||||||
|
* **[Limitations](#limitations)**
|
||||||
|
* **[Contributions](#contributions)**
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Inputs
|
||||||
|
|
||||||
|
## GitHub Action
|
||||||
|
|
||||||
|
This action can be used in any GitHub workflow, below you can find a simple example of manually triggered workflow backporting a specific pull request (provided as input).
|
||||||
|
|
||||||
|
```yml
|
||||||
|
name: Pull Request Backporting using BPer
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
targetBranch:
|
||||||
|
description: 'Target branch'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
pullRequest:
|
||||||
|
description: 'Pull request'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
dryRun:
|
||||||
|
description: 'Dry run'
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
backporting:
|
||||||
|
name: "Backporting"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Backporting
|
||||||
|
uses: lampajr/backporting@main
|
||||||
|
with:
|
||||||
|
target-branch: ${{ inputs.targetBranch }}
|
||||||
|
pull-request: ${{ inputs.pullRequest }}
|
||||||
|
auth: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
dry-run: ${{ inputs.dryRun }}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also use this action with other events - you'll just need to specify `target-branch` and `pull-request` params.
|
||||||
|
|
||||||
|
For a complete description of all inputs see [Inputs section](#inputs).
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
## Contributions
|
Loading…
Add table
Reference in a new issue