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

OSOE-144: Automatic comment on pull requests that have a merge conflict #60

Merged
merged 43 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
cd072ee
Add new action
Oct 4, 2022
d4979d1
Fix
Oct 4, 2022
87a12cc
Fixing workflow error.
Oct 4, 2022
f30d748
Fixing workflow error.
Oct 4, 2022
916ddb4
Adding input
Oct 4, 2022
d88e9bd
Trying out workflow
Oct 4, 2022
1d67005
Moving token
Oct 4, 2022
ed3fdb9
Add required prop
Oct 4, 2022
745ba71
Change "on"
Oct 4, 2022
33e8080
Change text
Oct 4, 2022
f24f259
Add doc + merge conflict prep.
Oct 4, 2022
6402f79
bump
Oct 4, 2022
7517630
Test empty label
Oct 4, 2022
31594fa
Adding back label
Oct 4, 2022
c755f2a
Adding documentation
Oct 5, 2022
3096dc5
Typo
Oct 5, 2022
c85e14d
Improving documentation
Luko6 Oct 7, 2022
da98e42
Why are you like this
Luko6 Oct 7, 2022
e9c7983
Update verify-this-repo.yml
Luko6 Oct 7, 2022
20ac259
Updating workflow
Luko6 Oct 7, 2022
23a337a
Delete check-merge-conflict.yml
Luko6 Oct 7, 2022
3457cbe
Update verify-submodule-pull-request.yml
Luko6 Oct 7, 2022
f076fbe
Merge branch 'issue/OSOE-144' of https://github.com/Lombiq/GitHub-Act…
Luko6 Oct 7, 2022
b0dfe4b
Update build-and-test-orchard-core.yml
Luko6 Oct 7, 2022
759bc7e
Merge remote-tracking branch 'origin/dev' into issue/OSOE-144
Luko6 Oct 7, 2022
68effc1
Update verify-submodule-pull-request.yml
Luko6 Oct 7, 2022
dce2f43
Updating documentation from workflow documentation
Luko6 Oct 7, 2022
08e3f8d
Add new reusable workflow
Luko6 Oct 13, 2022
dd4b1c9
Modify workflows
Luko6 Oct 13, 2022
6625ce2
Fixing action's name
Luko6 Oct 13, 2022
43b8cf6
Fixing action
Luko6 Oct 13, 2022
3c4ef44
Revert "Fixing action"
Luko6 Oct 13, 2022
6b2997b
Fixing action
Luko6 Oct 13, 2022
be74382
Fixing action
Luko6 Oct 13, 2022
6ebdf60
Move action to correct place
Luko6 Oct 13, 2022
f7cc32d
Documentation
Luko6 Oct 13, 2022
47275e4
Merge remote-tracking branch 'origin/dev' into issue/OSOE-144
Luko6 Oct 14, 2022
c549c12
Updating documentation
Luko6 Oct 14, 2022
7812411
Renaming and extending workflow
Luko6 Oct 14, 2022
f996d40
Correcting workflow name
Luko6 Oct 14, 2022
cfc78b4
Remove trigger
Luko6 Oct 14, 2022
32e6c1a
Merge remote-tracking branch 'origin/dev' into issue/OSOE-144
Oct 17, 2022
97cc86b
Renaming file
Oct 17, 2022
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
13 changes: 13 additions & 0 deletions .github/actions/check-merge-conflict/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Check For Merge Conflict
description: Checks for merge conflicts in in the current pull request.

runs:
using: "composite"
steps:
- name: Check for merge conflict
# releases/2.x
uses: eps1lon/actions-label-merge-conflict@b8bf8341285ec9a4567d4318ba474fee998a6919
Piedone marked this conversation as resolved.
Show resolved Hide resolved
with:
repoToken: ${{ env.GITHUB_TOKEN }}
commentOnDirty: "This pull request has merge conflicts. Please resolve those before requesting a review."
dirtyLabel: "Merge Conflict"
4 changes: 4 additions & 0 deletions .github/workflows/verify-submodule-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ jobs:
uses: Lombiq/GitHub-Actions/.github/actions/verify-submodule-pull-request@dev
with:
title: ${{ github.event.pull_request.title }}
- name: Check for Merge Conflict in PR
Piedone marked this conversation as resolved.
Show resolved Hide resolved
uses: Lombiq/GitHub-Actions/.github/actions/check-merge-conflict@issue/OSOE-144
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions Docs/Actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ These actions can be invoked from a step in any other repository's workflow. The
In addition to the below short explanations, check out the inline documentation of the action you want to use, especially its parameters.

- `build-dotnet`: Builds all .NET solutions or projects in the given directory with optional static code analysis.
- `check-merge-conflict`: Labels and comments on pull requests with merge conflicts.
- `create-jira-issues-for-community-activities`: Creates Jira issues for community activities happening on GitHub, like issues, discussions, and pull requests being opened. Pull requests are only taken into account if they're not already related to a Jira issue (by starting their title with a Jira issue key).
- `enable-corepack`: Enables [Node corepack](https://nodejs.org/docs/latest-v16.x/api/corepack.html) so any package manager can be used seamlessly.
- `publish-nuget`: Publishes the content of the current directory as a NuGet package.
Expand Down
15 changes: 15 additions & 0 deletions Docs/Workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ jobs:
timeout-minutes: 10
```

## Check For Merge Conflict

Labels and comments on Pull Requests with merge conflicts.

```yaml
name: Check For Merge Conflict

on:
pull_request:

jobs:
call-check-merge-conflict:
uses: Lombiq/GitHub-Actions/.github/workflows/check-merge-conflict.yml@dev
```

## NuGet publish workflow

Builds the project with the .NET SDK and publishes it as a NuGet package to the configured NuGet feed. Example _publish.yml_:
Expand Down