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

[Feature] Add Option to Remove Merge Commit #1474

Closed
2 tasks done
Huzaifa-Asif opened this issue Nov 13, 2023 · 2 comments · Fixed by #1472
Closed
2 tasks done

[Feature] Add Option to Remove Merge Commit #1474

Huzaifa-Asif opened this issue Nov 13, 2023 · 2 comments · Fixed by #1472
Labels
enhancement New feature or request

Comments

@Huzaifa-Asif
Copy link

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

If we add an option to remove the merge commit before the eslint changes in the config option it will be very good, as the merge commit pulls changes from the base branch and it is causing a lot of issues in our workflow as we didn't want to do that and sometimes because of this un-necessary features are pulled and cause issue during deployment.

Describe the solution you'd like?

The solution should be adding a boolean variable in GitHub action eslint config where we can turn this on and off.

Describe alternatives you've considered?

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Huzaifa-Asif Huzaifa-Asif added the enhancement New feature or request label Nov 13, 2023
Copy link
Contributor

Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience.

@jackton1
Copy link
Member

jackton1 commented Nov 13, 2023

Hi @Huzaifa-Asif, the merge commits wouldn’t be coming from this action. Based on testing the reason you are seeing merge commits is as a result of the checkout action merging the base branch and the pull request branch's latest commit.

See: actions/checkout#881

A solution for this would be

- uses: actions/checkout@v4
  with:
    ref: ${{ github.event.pull_request.head.sha }}
    fetch-depth: 0

Mentioned here: https://github.com/actions/checkout/blob/v3.0.2/README.md#user-content-checkout-pull-request-head-commit-instead-of-merge-commit

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

Successfully merging a pull request may close this issue.

2 participants