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

feat: github action to check the merge conflict on push #218

Closed
wants to merge 1 commit into from
Closed

feat: github action to check the merge conflict on push #218

wants to merge 1 commit into from

Conversation

sambhavgupta0705
Copy link
Member

Description

current PR adds a github actions which will check all the open PR when a push commit is made and will leave a comment if there is a merge conflict.

Related issue(s)

Resolves #181

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@sambhavgupta0705
Copy link
Member Author

hey @derberg will require your lot of help in this one.
I checked it on my local project first and it was working fine there.
Kindly review it let me know the areas where I can improve.

auto-comment-merge-conflicts:
runs-on: ubuntu-latest
steps:
- uses: codytseng/auto-comment-merge-conflicts@v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: codytseng/auto-comment-merge-conflicts@v1
- uses: codytseng/auto-comment-merge-conflicts@d621e322650866ded2c0753ea565dd83a18e01ff #using 1.3 version https://github.com/CodyTseng/auto-comment-merge-conflicts/releases/tag/v1.3.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should always try to use commitId from actions that do not belong to GitHub itself, for security reason.


on: push

permissions:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed? we never used it before

@@ -0,0 +1,18 @@
name: Auto Comment Merge Conflicts

on: push
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on push to where? remember in AsyncAPI contributor make a push to the fork, will this action know that it runs in the scope of a fork but must place a comment in the upstream repository?

- uses: codytseng/auto-comment-merge-conflicts@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-body: "Hey there 👋🏼, your current PR has some merge conflicts. KIndly try to resolve them in your local fork and push the new changes."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we could give some hints? instructions? or maybe even action could figure that if conflict is with package-lock, what are the options to solve it?

@KhudaDad414
Copy link
Member

hey @sambhavgupta0705, are you still working on this issue?

@sambhavgupta0705
Copy link
Member Author

Yes @KhudaDad414 ,I was just busy with other work and my exams.
I will be resolving it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create global workflow that informs PR author about merge conflicts
3 participants