Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds fast-forward action and updates to pre-commit #2

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading