qchateau / conan-center-bot

A bot to automatically update conan-center-index
GNU General Public License v3.0
11 stars 2 forks source link

Automatic PRs creation doesn't work (at least for me) #53

Open mathbunnyru opened 3 years ago

mathbunnyru commented 3 years ago

I tried to automatically create PR for mongo-cxx-driver.

I used this link: https://github.com/qchateau/conan-center-index/pull/new/ccb-mongo-cxx-driver-3.6.2

When I press Create pull request button, I get the following error: Pull request creation failed. Validation failed: You can't perform that action at this time.

Screenshot 2021-01-02 at 00 03 31
qchateau commented 3 years ago

It probably only work for me then, I need to check that feature from another github account properly :/

prince-chrismc commented 3 years ago

Ive been able to create PRs in the past and recently!

mathbunnyru commented 3 years ago

Ive been able to create PRs in the past and recently!

Unfortunately. still doesn't work for me.

qchateau commented 3 years ago

That's weird, there's no magic with this feature, it's just a plain URL. If you're connected to your github account it should work I guess

prince-chrismc commented 3 years ago

Try this https://github.com/conan-io/conan-center-index/compare/master...qchateau:ccb-mongo-cxx-driver-3.6.2

qchateau commented 3 years ago

Works for me

mathbunnyru commented 3 years ago

Try this conan-io/conan-center-index@master...qchateau:ccb-mongo-cxx-driver-3.6.2

It doesn't work as well :(

qchateau commented 3 years ago

Meh, I need to create a test github account

qchateau commented 3 years ago

Weird: https://github.com/conan-io/conan-center-index/pull/4421

ericLemanissier commented 3 years ago

I got the same error message as @mathbunnyru described earlier, but it worked when I modified the text of the pull request.

qchateau commented 3 years ago

Oh maybe that's it, it sounds like an anti spam feature of Github. I've always modified the text, be it to set the right library name or version, or to include a footnote about CCB

prince-chrismc commented 3 years ago

I always check the boxes!

it sounds like an anti spam feature

👍

mathbunnyru commented 3 years ago

Thanks @ericLemanissier, it worked for me as well.

@qchateau I think we could change the message in the PR so it always includes the package name and the new version. This way we will make sure all the messages are a bit different and I think it will prevent GitHub from denying PRs.

qchateau commented 3 years ago

The initial text is the template defined by CCI, as much as I'd like to, I don't think my bot/website can change the default text

prince-chrismc commented 3 years ago

https://github.com/conan-io/conan-center-index/pull/4522

mathbunnyru commented 3 years ago

The initial text is the template defined by CCI, as much as I'd like to, I don't think my bot/website can change the default text

That's true, but I think we can add some text here: https://github.com/qchateau/conan-center-bot/blob/c55f327e1117e467eef62c4d04bf22da876e28b9/ccb/update/common.py#L243

Generated and committed by Conan Center Bot
Find more updatable recipes in the GitHub Pages

This is always in the first PR message, so I think adding info about the name of the recipe and the version won't hurt and it might resolve my issue.

qchateau commented 3 years ago

This is the commit message, which already contains the library name on version on its first line. It seems by default Github uses the first line of the commit message as the PR title, and the rest of the commit message as the PR description. Then the CCI PR template is appended.

https://github.com/qchateau/conan-center-bot/blob/c55f327e1117e467eef62c4d04bf22da876e28b9/ccb/update/common.py#L242-L244