reenhanced / gitreflow

Reflow automatically creates pull requests, ensures the code review is approved, and squash merges finished branches to master with a great commit message template.
MIT License
1.49k stars 64 forks source link

Default approval regex not respecting :+1: #182

Closed davidcaseria closed 8 years ago

davidcaseria commented 8 years ago

After using git reflow setup, the constants section in the .gitconfig.reflow file defaults the approvalRegex with (?i-mx:lgtm|looks good to me|:\\+1:|:thumbsup:|:shipit:), however it does not respect PRs that have been approved by 👍 (:+1:).

simonzhu24 commented 8 years ago

@davidcaseria I believe the correct expression should be: (?i-mx:lgtm|looks good to me|:\+1:|:thumbsup:|:shipit:)

I can look more into this issue. In the meantime, could you please modify your ~/.gitconfig.reflow to the expression above?

simonzhu24 commented 8 years ago

@davidcaseria This should no longer be an issue when my pull request is approved! The issue was that when you call to_s in Ruby on the regex: (?i-mx:lgtm|looks good to me|:\+1:|:thumbsup:|:shipit:), it adds an extra \ to the :\+1: expression for some reason. So when I was adding this to your ~/gitconfig.reflow file, there was an extra \ inserted. Feel free to checkout the pull request ^_^

davidcaseria commented 8 years ago

@simonzhu24: I changed the config be received the following error:

$ git reflow setup
fatal: bad config file line 9 in /Users/david/.gitconfig.reflow
simonzhu24 commented 8 years ago

@davidcaseria: without seeing exactly what you have put on line 9, it is hard for me to debug your issue. The only change that you have to make in the config file from the original config is to remove a \ from the \ expression.

davidcaseria commented 8 years ago

@simonzhu24: Here is the full .gitconfig.reflow:

[github]
        site = https://github.com
        endpoint = https://api.github.com
        oauth-token = REDACTED
[reflow]
        git-server = GitHub
[constants]
        minimumApprovals =
        approvalRegex = (?i-mx:lgtm|looks good to me|:\+1:|:thumbsup:|:shipit:)
simonzhu24 commented 8 years ago

@davidcaseria Sorry for the late response, yesterday was very hectic. I believe that approvalRegex needs to have a complete regular expression as the value. It should be something like:

/(?i-mx:lgtm|looks good to me|:\+1:|:thumbsup:|:shipit:)/

Please let me know if this doesn't work for you.

davidcaseria commented 8 years ago

@simonzhu24 : No worries. That approvalRegex still results in the same config error for any git commands.

codenamev commented 8 years ago

@davidcaseria what version of git are you using? also, can you do a sanity check for me git reflow --version

davidcaseria commented 8 years ago
$ git --version
git version 2.7.4 (Apple Git-66)
$ git reflow --version
git-reflow version 0.7.5

@codenamev: Should I upgrade to the latest versions?

codenamev commented 8 years ago

Ah, yes, we released 0.8.1 that adds quite a few fixes. Please review our latest release so you're aware of the latest changes to the underlying workflow.

If your problem goes away please close this or let me know so that I can :smile:

davidcaseria commented 8 years ago

@codenamev: It seems like 👍 is still not being respected in v0.8.1.

simonzhu24 commented 8 years ago

The diff is still out and not merged yet, please wait for it to be merged.

On Wednesday, June 8, 2016, David Caseria notifications@github.com wrote:

@codenamev https://github.com/codenamev: It seems like 👍 is still not being respected in v0.8.1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/reenhanced/gitreflow/issues/182#issuecomment-224658100, or mute the thread https://github.com/notifications/unsubscribe/ARbXYNT_iQHzMevAwfnnotENb16Adobnks5qJvVhgaJpZM4Ir-1L .