cirrus-actions / rebase

GitHub Action to automatically rebase PRs
MIT License
687 stars 139 forks source link

Communicate inside the PR #42

Open asbjornu opened 4 years ago

asbjornu commented 4 years ago

After /rebase is triggered, it would be nice to not have to manually go to "Actions" and click through to the rebase workflow to see how it is doing. When the action is triggered, it would be nice to get some sort of feedback in the PR and if it fails, the error message could be posted as a comment in the PR.

Paulomart commented 4 years ago

I thought about using reaction for this, but then where is no way to display the error

asbjornu commented 4 years ago

@Paulomart, what do you mean "no way to display the error"? Many code review tools, such as reviewdog and Codacy are triggered with GitHub Actions and report their findings through GitHub's API with comments and annotations in the pull request. Is this not possible to do with the rebase action?

Paulomart commented 4 years ago

Yeah that would be totally possible, but I think it would be a lot of noice.

asbjornu commented 4 years ago

I would say that the rebase action builds up to the expectancy of being able to communicate with comments in the PR, as that's how the rebase is triggered to begin with; by typing /rebase into a comment in the PR. This sort of human-bot-communication is exactly how Dependabot works. See SwedbankPay/swedbank-pay-sdk-dotnet#44 as an example:

Dependabot

As such, I wouldn't consider a single comment explaining how the rebase can't be performed as noise, I would consider it valuable and expected information. Having to click through to the GitHub Action and dig in the logs to even discover that the rebase can't be performed and why is not the best user experience.

asbjornu commented 4 years ago

I would actually love it if the rebase action behaved almost exactly like Dependabot. Here's a more concrete suggestion:

  1. When the rebase is started, the action could add a 👍 to the comment containing /rebase, just to visualize that the command is noticed. A missing 👍 would mean something with the action is wrong and that one would have to go investigate. Now, you sort of have to investigate no matter what.
  2. A GitHub Check is added to the PR to visualize the status of the rebase: Yellow for "in progress", green for completed successfully and red for completed unsuccessfully.
  3. When the rebase can't be performed, a comment explaining why is posted in the PR, with a link to the exact place it failed in the logs.