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

Override MERGE_METHOD with labels? #26

Closed
chancancode opened this issue Nov 1, 2019 · 2 comments
Closed

Override MERGE_METHOD with labels? #26

chancancode opened this issue Nov 1, 2019 · 2 comments

Comments

@chancancode
Copy link

Hello! First of all, this is great! Thank you for sharing your code!

Would it be possible to allow labels to override the MERGE_METHOD? I ask because we usually prefer the merge method, but occasionally, a contributor will open a PR with many commits, in which case it would be better to use the squash method.

Since this action uses environment variables, I think I can do that myself by running a step to set the variable before running this action, but it would be great if that feature is built-in!

@pascalgn
Copy link
Owner

pascalgn commented Nov 9, 2019

I think the easiest solution would be to create 2 action workflows, maybe one named automerge.yml (following the documentation in the README), and one named autosquash.yml which is a copy, with the following configuration:

        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
          MERGE_LABELS: "autosquash"
          MERGE_METHOD: "squash"

@pascalgn
Copy link
Owner

I closed this now, but feel free to reopen it (or open a new issue) if you have any other questions, remarks, etc.!

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

No branches or pull requests

2 participants