eps1lon / actions-label-merge-conflict

GitHub action that adds a label once a PR has merge conflicts
48 stars 16 forks source link

Feature request: Filter by author #113

Open SubJunk opened 9 months ago

SubJunk commented 9 months ago

Hi, thank you for this Action, it's really useful for me! I'm using it to help automate Dependabot changelogs. It would be great if I could make it only look at PRs opened by certain authors (in my case, Dependabot). Is that possible?

This is my use case, basically this Action just needs to leave a comment on Dependabot pull requests to tell it to recreate the PR: https://github.com/UniversalMediaServer/UniversalMediaServer/blob/cd219026f348853c4bcb1e971160af54c352a90a/.github/workflows/pull-request-conflict.yaml and that works along with this step https://github.com/UniversalMediaServer/UniversalMediaServer/blob/cd219026f348853c4bcb1e971160af54c352a90a/.github/workflows/ci.yaml#L258-L275 which updates the changelog in the Dependabot PRs

eps1lon commented 7 months ago

Can't you do this on your own by skipping the action via if? E.g.

steps:
  - name: check if prs are dirty
    if: ${{ github.event.pull_request.user.login == 'dependabot' }
    uses: eps1lon/actions-label-merge-conflict@v3
SubJunk commented 7 months ago

Good idea, I'll try it and report back

SubJunk commented 7 months ago

This is working well, thank you!

SubJunk commented 6 months ago

@eps1lon I don't think it is working. It needs to match the author of the open Pull Requests that are being checked, not the one that triggers the action.

estahn commented 4 weeks ago

Same issue I'm trying to solve. But I will probably just add the label and the label will then trigger adding a comment. Thus I have the context of the PR available. At least thats the plan.

estahn commented 4 weeks ago

Same issue I'm trying to solve. But I will probably just add the label and the label will then trigger adding a comment. Thus I have the context of the PR available. At least thats the plan.

Well, that didn't work out so well...

Workflows will not run on pull_request activity if the pull request has a merge conflict. The merge conflict must be resolved first.