Skip to content

Commit

Permalink
Adds fast-forward action and updates to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikSpiegel committed Mar 5, 2024
1 parent ab0ebae commit 992e6e3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/fast-forward.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Fast Forward PR
on:
issue_comment:
types: [created]

jobs:
fast_forward_job:
name: Fast Forward
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/fast-forward')
runs-on: ubuntu-latest
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
uses: actions/checkout@v2
# Basic use case example
- name: Fast Forward PR
id: ff-action
uses: endre-spotlab/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
success_message: 'Success! Fast forwarded ***target_base*** to ***source_head***! ```git checkout target_base && git merge source_head --ff-only``` '
failure_message: 'Failed! Cannot do fast forward! - try merging the target back into source first.'
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ repos:
rev: v1.2.3
hooks:
- id: no-commit-to-branch
args: ["--branch", "staging", "--branch", "main", "--branch", "dev"]
args: [--branch, staging, --branch, main, --branch, dev]
- id: check-added-large-files
args: ['--maxkb=200']
# - id: file-contents-sorter
# files: '^\.Rbuildignore$'
- id: end-of-file-fixer
exclude: >
'\.Rd'
'tests/testthat/_snaps'
# - id: end-of-file-fixer
# exclude: >
# \.Rd|
# tests/testthat/_snaps/*
- id: detect-private-key
# - id: detect-aws-credentials
- repo: local
Expand Down

0 comments on commit 992e6e3

Please sign in to comment.