Skip to content

APN-Pucky/fast-forward-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fast-forward-action

Adds a fast-forward label to PRs and fast-forwards them on /fast-forward comment.

Use case

Github Web UI does not allow fast-forwarding of PRs:

https://stackoverflow.com/questions/60597400/how-to-do-a-fast-forward-merge-on-github

This disallows a linear commit history with a delayed stable branch.

Inputs

Input Description
GITHUB_TOKEN Automatically provided token, that can be used to authenticate on behalf of the GitHub action, with permissions limited to the repository that contains your workflow
SSH_PRIVATE_KEY Deploy key for push. Must be set in the repository settings. This is used by the action to push the fast-forwarded branch/commit/PR.

Workflow YML

The Action must be run on triggers to keep the labels up-to-date and run the fast-forward on command.

name: Fast-Forward

on: 
  issue_comment:
    types: [created]
  push:
  pull_request:

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: APN-Pucky/fast-forward-action@main
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SSH_PRIVATE_KEY: ${{ secrets.GH_SSH }}

Examples

For working examples checkout the fast-forward tagged PRs. They have been merged via the /fast-forward command.