Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add relation between project and remote repoistory objects #2745

Merged
merged 2 commits into from
Apr 25, 2017

Conversation

agjohnson
Copy link
Contributor

@agjohnson agjohnson commented Mar 24, 2017

This will be used with the webhook additions to more tightly couple projects and
data from GitHub. For webhooks, this work will allow us to explicitly tell how
the project is connected to the GitHub/Bitbucket/etc repo, and will allow for
explicit resyncing of the webhook as well.

This overhauls the testing of the project import wizard, both the wizard and the tests were doing a lot of things that weren't required or were straight up incorrect. The tests are now based on client factories, because it was too difficult to debug failing tests otherwise. This exposed a number of places that the wizard view was doing some wrong things however, so seems more complete.

Refs #1895

@agjohnson agjohnson added the PR: work in progress Pull request is not ready for full review label Mar 24, 2017
@agjohnson agjohnson force-pushed the project-remoterepository branch 3 times, most recently from eac71cb to 33d5093 Compare March 25, 2017 00:30
@agjohnson agjohnson added PR: ready for review and removed PR: work in progress Pull request is not ready for full review labels Mar 28, 2017
@agjohnson
Copy link
Contributor Author

Noticed the relation in this model is off, we don't want cascade delete on remote repo objects here as it leads to a missing repo on project removal.

@agjohnson agjohnson added PR: work in progress Pull request is not ready for full review and removed PR: ready for review labels Mar 29, 2017
@agjohnson agjohnson mentioned this pull request Mar 30, 2017
3 tasks
This will be used with the webhook additions to more tightly couple projects and
data from GitHub. For webhooks, this work will allow us to explicitly tell how
the project is connected to the GitHub/Bitbucket/etc repo, and will allow for
explicit resyncing of the webhook as well.
@agjohnson agjohnson force-pushed the project-remoterepository branch from 33d5093 to 1325ea0 Compare April 21, 2017 18:29
@agjohnson agjohnson added PR: ready for review and removed PR: work in progress Pull request is not ready for full review labels Apr 21, 2017
@agjohnson agjohnson requested a review from ericholscher April 21, 2017 18:34
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great -- should we also be doing something to reset the remote repos on webhook? Seems like we probably want to backport this data onto the existing projects, not just set it for new ones.

@agjohnson
Copy link
Contributor Author

There isn't a great way to do that and ensure the repo is correct. I was considering a later follow up to this would be to replace the repo URL in the project admin with another remoterepo form, so the project could later be reconnected to another repository. I'm not sure if that is the correct UX though.

For the purpose of webhooks, not have every project connected to a remoterepo works just fine. We need to be able to detect if a project has any connection to a remote repo to determine if we can set up a webhook at all, or if the user should handle it manually.

If we find it useful, this is something that could be done separately

@agjohnson agjohnson merged commit f684dc9 into master Apr 25, 2017
@agjohnson agjohnson deleted the project-remoterepository branch April 25, 2017 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants