Skip to content

git-webkit setup installs hooks in cwd repository #47139

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

Conversation

briannafan
Copy link
Contributor

@briannafan briannafan commented Jun 24, 2025

e6080b6

git-webkit setup installs hooks in cwd repository
rdar://143774918
https://bugs.webkit.org/show_bug.cgi?id=293771

Reviewed by Jonathan Bedard.

Check whether the repository the program is run in is under the WebKit Project.
If not, warn the user that installing hooks may be undesirable.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/install_hooks.py:
(InstallHooks.main):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_hooks_unittest.py:
(TestInstallHooks.test_security_levels):
(TestInstallHooks.test_install_hook):
(TestInstallHooks.test_install_hook_alternate_hook_path_change):
(TestInstallHooks.test_install_hook_alternate_hook_path_use):
(TestInstallHooks.test_install_hook_alternate_hook_path_exit):
(TestInstallHooks.test_security_level_in_hook):

Canonical link: https://commits.webkit.org/296586@main

f7a6f97

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 webkitpy 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision 🧪 mac-AS-debug-wk2 🧪 gtk-wk2
✅ 🧪 services ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ❌ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@briannafan briannafan self-assigned this Jun 24, 2025
match = repository.SSH_REMOTE.match(url) or repository.HTTP_REMOTE.match(url)
if match:
path = match.group('path')
if 'webkit' not in path.lower():
Copy link
Member

Choose a reason for hiding this comment

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

You're going to match anything that's WebKit/<project> or <org>/WebKit. I'm approving this, although we should consider basing this off of a variable in metadata/git_config_extension instead, which would be more generic.

@briannafan briannafan added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 24, 2025
rdar://143774918
https://bugs.webkit.org/show_bug.cgi?id=293771

Reviewed by Jonathan Bedard.

Check whether the repository the program is run in is under the WebKit Project.
If not, warn the user that installing hooks may be undesirable.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/install_hooks.py:
(InstallHooks.main):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/install_hooks_unittest.py:
(TestInstallHooks.test_security_levels):
(TestInstallHooks.test_install_hook):
(TestInstallHooks.test_install_hook_alternate_hook_path_change):
(TestInstallHooks.test_install_hook_alternate_hook_path_use):
(TestInstallHooks.test_install_hook_alternate_hook_path_exit):
(TestInstallHooks.test_security_level_in_hook):

Canonical link: https://commits.webkit.org/296586@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/git-webkit-setup-installs-hooks-in-cwd-repository branch from f7a6f97 to e6080b6 Compare June 24, 2025 23:22
@webkit-commit-queue
Copy link
Collaborator

Committed 296586@main (e6080b6): https://commits.webkit.org/296586@main

Reviewed commits have been landed. Closing PR #47139 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit e6080b6 into WebKit:main Jun 24, 2025
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 24, 2025
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.

4 participants