#400 Implementation of GithubOrganization and GithubRepo validators
Merged by abompard. Opened by anar.
anar/fedora-hubs GithubValidators  into  develop

Download 400.patch

Changed the way validation occurs: now every Widget has validate_parameters() method, which performs the validation. We can have custom validations for each Widget subclass. That was necessary because It was impossible to validate GithubRepo having only one parameter, which is reponame. Now we can use both owner and reponame to validate GithubRepo.

Fixes #351
Also, what's the matter with "The pull-request cannot be merged due to conflicts"? I don't get where the conflicts are.

Please rebase on the current develop branch, you'll see that Validators have changed a bit (they are now simple functions).

rebased onto 5fb30a12ce16d2b85a1dbac5d18a85a2221c06af

rebased onto 1f16def65322d5e9bd484fe9f56911275e5c1d96

Please rebase on the current develop branch, you'll see that Validators have changed a bit (they are now simple functions).

Not sure if rebase notifies by email, therefore leaving this comment :)

We usually don't add this type of markers.

Please add a docstring here. Also, I think that values would be a better argument name.

You can use result.ok to test for a non-error return code, that's what the requests API recommends.

I don't think that we should use a Github API token here. This token would need to be user-specific and we currently don't have a way for a user to do an Oauth2 session with GitHub.
Without the token we won't get private repos but that's not a problem for now.

rebased onto efbae2fadf8041f96d5b23f543600c7320c0d22e

You missed a vals argument here

Please describe the argument in the docstring using the format you'll see elsewhere in this file and in Hubs (Google-style).

You might as well just return result.ok.

As a general comment, also remember to run tox -e lint before pushing the PR to check for syntax and style errors.

rebased onto 8b4ad65231e04a23ffb2a7a9b6d87a7c7c85b2fa

Running the tests should have created two files in hubs/tests/vcr-request-data/, please include them in your pull request.

1 new commit added

  • Added files created by testing

Running the tests should have created two files in hubs/tests/vcr-request-data/, please include them in your pull request.

Added mentioned files.

Pull-Request has been merged by abompard

Metadata