github3.py icon indicating copy to clipboard operation
github3.py copied to clipboard

Add Organization Webhooks Preview

Open sigmavirus24 opened this issue 9 years ago • 4 comments

See the announcement for more details

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6797101-add-organization-webhooks-preview?utm_campaign=plugin&utm_content=tracker%2F183477&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F183477&utm_medium=issues&utm_source=github).

sigmavirus24 avatar Dec 05 '14 16:12 sigmavirus24

Hi Ian, Do you think that this is an opportunity to create a directory orgs for the organizations? I would do it as a prerequisite to this addition. I think a lot of code will be common with the repositories webhooks. I would consider a generic hook model and inheritance for the repository and organization hook. Any thought or objection?

antoine-g avatar Jul 27 '15 15:07 antoine-g

Do you think that this is an opportunity to create a directory orgs for the organizations? I would do it as a prerequisite to this addition.

It's not clear to me why this is necessary.

sigmavirus24 avatar Jul 27 '15 17:07 sigmavirus24

You were right this is not necessary.

I have started a WIP branch to add the Organization hooks support: https://github.com/sigmavirus24/github3.py/compare/develop...antoine-g:feature/org-hooks.

Main changes that are open to discussion:

  • New models RepositoryHook and OrganizationHook inherit from Hook.
  • New test file for orgs
  • OrganizationHook support added to Organization

Current issues:

  • New org hooks tests fail. I think you would like to use the github3py organization but I don't have the permissions to make the tests succeed for the first time and record the cassettes.
  • I am unclear with the test files under tests/. Were they migrated to tests/unit and tests/integration?
  • This introduces a breaking change for the use of repository hooks.
  • Some functions from Hook are tested twice, once for each implementation. Should I write tests dedicated to the Hook class instead?

I would be happy to get some feedback. Thanks

antoine-g avatar Jul 28 '15 14:07 antoine-g

@antoine-g Have you done any more work? I would like to implement this feature but would like to know where your fork is at compared to the latest changes. I can base my fork off of your fork.

New org hooks tests fail. I think you would like to use the github3py organization but I don't have the permissions to make the tests succeed for the first time and record the cassettes.

@sigmavirus24 Is access to that organisation still required for testing or has everything been mocked now? #350 talks about mocking suite, but I guess that's just to make it easier to add tests with mocks?

AndreasBackx avatar Jun 19 '16 17:06 AndreasBackx