Opened 10 years ago
Closed 8 years ago
#633 closed enhancement (fixed)
Add sync for develop.git.wordpress.org with Github
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Version Control | Keywords: | |
Cc: |
Description
By syncing develop.* we can take advantage of travis-ci and have an official travis repository.
Attachments (1)
Change History (29)
This ticket was mentioned in Slack in #core by netweb. View the logs.
10 years ago
#7
@
10 years ago
@MarkJaquith Were you looking into this? Any progress updates?
I may even heard there was talk about this at WordCamp London?
I ask because I'd like to get the bbPress mirror per #637 sooner rather than later :)
#9
@
9 years ago
Just an update, this was brought up again today in #core:
https://wordpress.slack.com/archives/core/p1470258714002025
#10
@
8 years ago
Just an update, this was brought up again today in #core:
https://wordpress.slack.com/archives/core/p1477460871009583
This ticket was mentioned in Slack in #core by netweb. View the logs.
8 years ago
#12
@
8 years ago
Mirror now exists.
https://github.com/WordPress/wordpress-develop
It seems to be quite slow to keep up, though. For example, as of now (30 minutes after it was committed to SVN), [WP39520] hasn't been synced to the mirror.
@jorbin, @nacin: Can you folks follow this up with your GitHub contacts?
#13
@
8 years ago
Sent a note to my contact.
@pento Can you add me as an admin to the repo so I can adjust the travis bits so that this becomes the repo of record rather than my mirror?
#14
@
8 years ago
@pento I also found this documentation which may be relevant - https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
#15
@
8 years ago
urgh, that was linked from https://help.github.com/articles/about-github-mirrors/ which is what I meant to cite.
#16
@
8 years ago
Yeah, I saw those docs, we apparently have some magical thing where GitHub pulls changes, instead of us pushing them in a post commit hook.
I'm not an admin on GitHub, @otto42 or @dd32 are probably the people to chat to about getting Travis set up.
#17
follow-up:
↓ 20
@
8 years ago
I'm 90% certain that the post-receive
hook mention on there is so that you could run something like git pull origin master; git push
(I can't remember the exact commands..), which is what we were avoiding by using the Github mirror functionality.
By using the mirror functionality it appears - although I haven't asked anyone, that this means it's basically on a recurring job to update it occasionally. That isn't going to work for us and our want for instantaneous pushes, so we're going to need to handle it manually with a post-receive
hook I expect.
The ideal option would be for there to be a webhook we can ping to trigger an update - if we want to reduce the amount of code in play on our side.
Lets avoid setting up Travis until we have this figured out, Just to reduce the usage of the repo until we're sure.
Also; What do we need to do to get all commits referencing the author? Ie. compare https://github.com/WordPress/WordPress/commit/3a0e61e680c9fd93440dd80e280991e544ff7ad7 to https://github.com/WordPress/wordpress-develop/commit/07b8be117762c804d24c611a518c9aec0c4173ee
#18
follow-up:
↓ 19
@
8 years ago
@dd32 compare the patches for both:
https://github.com/WordPress/WordPress/commit/3a0e61e680c9fd93440dd80e280991e544ff7ad7.patch
https://github.com/WordPress/wordpress-develop/commit/07b8be117762c804d24c611a518c9aec0c4173ee.patch
Note the differences in the author email addresses. This can be done for all committers by asking them to add their username@git.wordpress.org
email to their GitHub account. Once they do that, then GitHub will link it up to their accounts, for example: https://github.com/WordPress/wordpress-develop/commit/3669b4726087be0fe3c0a88aa8b811077d07245e
#19
in reply to:
↑ 18
@
8 years ago
Replying to westonruter:
Note the differences in the author email addresses. This can be done for all committers by asking them to add their
username@git.wordpress.org
email to their GitHub account.
Ahh right, I forgot that the WordPress/WordPress sync had email addresses.
It looks like adding it as an unconfirmed email address is enough though, as we don't currently have an email service setup for that domain.
#20
in reply to:
↑ 17
@
8 years ago
Replying to dd32:
Also; What do we need to do to get all commits referencing the author? Ie. compare https://github.com/WordPress/WordPress/commit/3a0e61e680c9fd93440dd80e280991e544ff7ad7 to https://github.com/WordPress/wordpress-develop/commit/07b8be117762c804d24c611a518c9aec0c4173ee
GitHub maintain an "authors" file, mapping each committer to an email address, I'm not exactly sure where this file is stored but I believe when a new committer is added it is this file @MarkJaquith has to update to get the "sync" working again for https://github.com/wordpress/wordpress
When importing a new VCS repo into GitHub you map the committers email address during import: https://cloudup.com/cy8Oe4GEX-n
Replying to westonruter:
Note the differences in the author email addresses. This can be done for all committers by asking them to add their
username@git.wordpress.org
email to their GitHub account. Once they do that, then GitHub will link it up to their accounts, for example: https://github.com/WordPress/wordpress-develop/commit/3669b4726087be0fe3c0a88aa8b811077d07245e
This doesn't work so well for other committers who also want to have their email address displayed publicly on their GitHub profile, they may want to use it for non WordPress purposes, for example https://github.com/rmccue, he'd be unable to have both his personal email address and rmccue@git.wordpress.org
#21
follow-up:
↓ 22
@
8 years ago
GitHub maintain an "authors" file, mapping each committer to an email address, I'm not exactly sure where this file is stored but I believe when a new committer is added it is this file @MarkJaquith has to update to get the "sync" working again for https://github.com/wordpress/wordpress
That's a git-svn thing, instead for git://develop.git.wordpress.org we map each committer to $user@git.wordpress.org
. Github itself doesn't need an Author file, the remapping on import is just incase the users email addresses differ or have changed.
This doesn't work so well for other committers who also want to have their email address displayed publicly on their GitHub profile, they may want to use it for non WordPress purposes, for example https://github.com/rmccue, he'd be unable to have both his personal email address and rmccue@…
It doesn't need to be the users primary email address, just an email address on their Github Emails screen, which is how it's working for a sub-selection of the committers atm (ie. me).
#22
in reply to:
↑ 21
@
8 years ago
Replying to dd32:
It doesn't need to be the users primary email address, just an email address on their Github Emails screen, which is how it's working for a sub-selection of the committers atm (ie. me).
Awesome, I can now map my w.org username (netweb) to my GitHub username (ntwb) :+1:
#23
@
8 years ago
So, trying to understand the magic of git mirrors, I think this is what we need:
- A new user on GitHub (say,
wordpressdotorg
), withpush
permissions toWordPress/wordpress-develop
. - On the w.org Git server, add
wordpressdotorg
's private key to~/.ssh/config
, as:Host github.com IdentityFile ~/.ssh/id_rsa_github
- Add to the
post-receive
file:git push -f --mirror git@github.com:WordPress/wordpress-develop.git
Can a git expert please confirm/deny this process? It seems far too simple to be the correct way to do things with git.
#24
@
8 years ago
@pento actually I don't think we need a new GitHub user. The right way (and easier way) is to allow pushes to a repo by adding a new deploy key on the WordPress/wordpress-develop
repo. Deploy keys are by default read & write so they'll be able to push and pull to the repo. More info at https://developer.github.com/guides/managing-deploy-keys/#deploy-keys
Other than that, I think what you outlined is correct.
#25
@
8 years ago
Oh, deploy keys are sweet.
I'm still not convinced that Git could make it this easy.
Related: #637 Add sync for bbpress.git.wordpress.org with Github