This action finds any merge conflicts in your repository.
Sometimes we accidentally resolve merge conflicts without actually resolving it, this action simply finds if we have any instances of files with merge conflicts we didn't resolve and reports them.
This is a GitHub action, so it has to be added to a GitHub workflow.
A simple example of running this action on all pushes to the repository would be
to add a main.yml
file under .github/workflows
with the following content
on: [push]
jobs:
merge_conflict_job:
runs-on: ubuntu-latest
name: Find merge conflicts
steps:
# Checkout the source code so there are some files to look at.
- uses: actions/checkout@v2
# Run the actual merge conflict finder
- name: Merge Conflict finder
uses: olivernybroe/action-conflict-finder@v4.0
On each push, it will now run the merge conflict finder
You can add custom excludes to the search through the following inputs:
A comma separate list of directories to ignore. The .git folder is always ignored
A comma separated list of files to ignore. Supports wildcard matching.
A workflow with the inputs could look like:
on: [push]
jobs:
merge_conflict_job:
runs-on: ubuntu-latest
name: Find merge conflicts
steps:
# Checkout the source code so we have some files to look at.
- uses: actions/checkout@v2
# Run the actual merge conflict finder
- name: Merge Conflict finder
uses: olivernybroe/action-conflict-finder@v4.0
with:
exclude_dir: "path/to/ignore,path/to/ignore2"
excludes: "ignore.me,*.zip"