Skip to content

Instantly share code, notes, and snippets.

View dklawren's full-sized avatar

David Lawrence dklawren

View GitHub Profile
@dklawren
dklawren / gist:fe48a1956de30b7c1914903514947724
Created April 14, 2017 17:20
docker-compose.yml for phabricator
version: '2'
services:
phabricator:
restart: always
ports:
- "62443:443"
- "62080:80"
- "62022:22"
volumes:
- ./repos:/repos
sub phabricator_url_re {
my $phab_uri = Bugzilla->params->{phabricator_base_uri} || 'https://example.com';
return qr/^${phab_uri}D\d+$/i;
}
our %autodetect_attach_urls = (
github_pr => {
title => 'GitHub Pull Request',
regex => qr#^https://github\.com/[^/]+/[^/]+/pull/\d+/?$#i,
content_type => 'text/x-github-pull-request',
diff --git a/auth/PhabricatorBMOAuth.css b/auth/PhabricatorBMOAuth.css
index cff2436..1ac99f8 100644
--- a/auth/PhabricatorBMOAuth.css
+++ b/auth/PhabricatorBMOAuth.css
@@ -3,8 +3,8 @@
*/
/* Hide the admin login */
- form[action=/auth/login/password:self/] { display: none; }
- form[action=/auth/login/password:self/].bmo-show { display: block; }
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100755
index 0000000..6cfdd57
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,44 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
@dklawren
dklawren / Phabricator.pm
Created August 2, 2017 16:34
extensions/Push/lib/Connector/Phabricator.pm
diff --git a/extensions/Push/lib/Connector/Phabricator.pm b/extensions/Push/lib/Connector/Phabricator.pm
index 092d63dd3..2d2fd2cb5 100644
--- a/extensions/Push/lib/Connector/Phabricator.pm
+++ b/extensions/Push/lib/Connector/Phabricator.pm
@@ -90,9 +90,10 @@ sub send {
: 'One revision was' )
. ' made private due to unknown Bugzilla groups.';
- my $user =
- Bugzilla->set_user(
<?php
final class PhabricatorBugzillaConfigOptions
extends PhabricatorApplicationConfigOptions {
public function getName() {
return pht('Bugzilla');
}
public function getDescription() {
sub check_user_permission_for_bug {
my ($self, $params) = @_;
my $user = Bugzilla->login(LOGIN_REQUIRED);
# Ensure PhabBugz is on
ThrowUserError('invalid_phabricator_request') unless Bugzilla->params->{phabricator_enabled};
# Validate that the requesting user's email matches phab-bot
ThrowUserError('unauthorized_user') unless $user->login eq PHAB_BMO_USER_EMAIL;
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
version: '2'
services:
bmo.test:
build:
context: ../bmo
diff --git a/scripts/remove-non-public-data.pl b/scripts/remove-non-public-data.pl
index ce7948dd0..56abe09cb 100755
--- a/scripts/remove-non-public-data.pl
+++ b/scripts/remove-non-public-data.pl
@@ -140,11 +140,11 @@ my $dbh = Bugzilla->dbh;
print "running sanitizeme.pl\n";
my $sanitizeme = catfile(realpath(dirname(__FILE__)), 'sanitizeme.pl');
-system $sanitizeme, '--execute';
+#system $sanitizeme, '--execute';
#Let’s enable extra metadata options by default
[automount]
enabled = true
root = /mnt/
options = "metadata,umask=22,fmask=11"
mountFsTab = false
#Let’s enable DNS – even though these are turned on by default, we’ll specify here just to be explicit.
[network]
generateHosts = true