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

request changes in PR with merge conflicts #4

Open
eps1lon opened this issue Mar 18, 2020 · 5 comments
Open

request changes in PR with merge conflicts #4

eps1lon opened this issue Mar 18, 2020 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@eps1lon
Copy link
Owner

eps1lon commented Mar 18, 2020

The ultimate goal is to send notifications to a user. I hoped that adding labels does the trick but it doesn't.

Seems like we have to fallback to comments anyway. I think reviews are a good place for that since they're dismissable. But simple comments might be sufficient (though harder to query).

Initial idea for a query leveraging reviews:

query { 
  repository(owner:"mui-org", name:"material-ui") { 
    pullRequests(states:OPEN,first:100) {
      nodes {
        reviews(author:"eps1lon",states:CHANGES_REQUESTED) {
          nodes {
            id
          }
        }
      }
    }
  }
}

If the PR is mergable dismiss this review. Otherwise add a review requesting changes.

@pradyunsg
Copy link

Plain comments work pretty well IMO: pypa/pip#8086 (comment)

@eps1lon
Copy link
Owner Author

eps1lon commented May 25, 2020

Plain comments work pretty well IMO: pypa/pip#8086 (comment)

I prefer using PRs for discussion. Comments from bots make the conversation hard to read which is why I try to avoid them as much as possible.

@baywet
Copy link
Contributor

baywet commented Jul 17, 2020

comments, reviews, labels.... is all a matter of personal preference. I'd rather have an action do one thing instead 10 at the same time and provide me information so I can conditionally chain other actions. Here is a PR that adds the output so people can then chain with additional actions.
#17

@pradyunsg
Copy link

Thanks @baywet! Do you have any example of how to actually use the output set by this action to do $things with it?

@baywet
Copy link
Contributor

baywet commented Aug 28, 2020

not at hand, it's in a private repo. But you need to give an id to the task (right below the name for example) so you can use the output variable in the following tasks

steps:
    - name: check if prs are dirty
      uses: eps1lon/actions-label-merge-conflict@main
      id: check
    - name: task2
      if: check.prDirtyStatuses[prIdVariable] == true

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

No branches or pull requests

3 participants