-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
The default strategy for merging pull requests when using /lgtm is a pull request merge. Some users might want to flexibility to control the merge strategy.
I took a stab at trying to implement this, but I have not worked with TypeScript, and could not easily.
Describe the solution you'd like
A clear and concise description of what you'd like to happen.
I would like to be able to choose the merge strategy when creating the action workflow for the LGTM cron job. Here is an example of what the action workflow could look like
name: "Merge on lgtm label"
on:
schedule:
- cron: "0 * * * *"
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: jpmcb/prow-github-actions
with:
jobs: 'lgtm'
merge-method: squash
github-token: "${{ secrets.GITHUB_TOKEN }}"Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
In my use case we prefer to squash when merging a pull request. If we can't control this we would need to disable the /lgtm command
Additional context
Add any other context or screenshots about the feature request here.
Based on your code here: https://github.com/jpmcb/prow-github-actions/blob/main/src/cronJobs/lgtm.ts#L115 there is an option in octokit/rest to set merge_method as documented here: https://octokit.github.io/rest.js/v18#pulls-merge