summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metadata/md5-cache/www-apps/phabricator-extensions-Sprint-2016030212
-rw-r--r--metadata/md5-cache/www-apps/phabricator-extensions-Sprint-999911
-rw-r--r--www-apps/phabricator-extensions-Sprint/Manifest4
-rw-r--r--www-apps/phabricator-extensions-Sprint/files/20160302-updates-to-upstream-46fb646f92b12a0031105d9fc9d67df6.patch162
-rw-r--r--www-apps/phabricator-extensions-Sprint/metadata.xml8
-rw-r--r--www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20160302.ebuild84
-rw-r--r--www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild73
7 files changed, 354 insertions, 0 deletions
diff --git a/metadata/md5-cache/www-apps/phabricator-extensions-Sprint-20160302 b/metadata/md5-cache/www-apps/phabricator-extensions-Sprint-20160302
new file mode 100644
index 00000000..290b5169
--- /dev/null
+++ b/metadata/md5-cache/www-apps/phabricator-extensions-Sprint-20160302
@@ -0,0 +1,12 @@
+DEFINED_PHASES=install postinst prepare test unpack
+DEPEND=>=dev-vcs/git-1.8.2.1
+DESCRIPTION=Manage your tasks with Points in Phabricator
+EAPI=5
+HOMEPAGE=Manage your tasks with Points in Phabricator
+IUSE=test
+KEYWORDS=~amd64
+LICENSE=GPL-3
+RDEPEND=dev-php/libphutil www-apps/phabricator
+SLOT=0
+_eclasses_=eutils 792f83d5ec9536cb5ccef375469d8bde git-r3 1731cf71913d74a7834d1f8d6b8ad3e3 multilib d062ae4ba2fc40a19c11de2ad89b6616 toolchain-funcs d513d423d449877e49d99af3f7af7acb
+_md5_=fa34ab80cc453313dbb5fac92b27a78a
diff --git a/metadata/md5-cache/www-apps/phabricator-extensions-Sprint-9999 b/metadata/md5-cache/www-apps/phabricator-extensions-Sprint-9999
new file mode 100644
index 00000000..0bc43cf0
--- /dev/null
+++ b/metadata/md5-cache/www-apps/phabricator-extensions-Sprint-9999
@@ -0,0 +1,11 @@
+DEFINED_PHASES=install prepare test unpack
+DEPEND=>=dev-vcs/git-1.8.2.1
+DESCRIPTION=Manage your tasks with Points in Phabricator
+EAPI=5
+HOMEPAGE=Manage your tasks with Points in Phabricator
+IUSE=test
+LICENSE=GPL-3
+RDEPEND=dev-php/libphutil www-apps/phabricator
+SLOT=0
+_eclasses_=eutils 792f83d5ec9536cb5ccef375469d8bde git-r3 1731cf71913d74a7834d1f8d6b8ad3e3 multilib d062ae4ba2fc40a19c11de2ad89b6616 toolchain-funcs d513d423d449877e49d99af3f7af7acb
+_md5_=55a464d4b9de37beaed19dbc5ce3d060
diff --git a/www-apps/phabricator-extensions-Sprint/Manifest b/www-apps/phabricator-extensions-Sprint/Manifest
new file mode 100644
index 00000000..ccbc16cc
--- /dev/null
+++ b/www-apps/phabricator-extensions-Sprint/Manifest
@@ -0,0 +1,4 @@
+AUX 20160302-updates-to-upstream-46fb646f92b12a0031105d9fc9d67df6.patch 6522 SHA256 e6a2abdb17f27ec3accc38f799b1e87fe3b40f4c3376903c4f36aff1d824b452 WHIRLPOOL 0b9def9e7843a26b8f8ef598755cb7cb25595b0f6dd3e15d3fbe585d67bd90422cf2a99054bde6e2596ed07e8c152d2cc808d1ea597769d0239686d2349b7586
+EBUILD phabricator-extensions-Sprint-20160302.ebuild 1972 SHA256 cfad0bd629493ca31383b65d949d91d5fdd59698f44ad86f5d029c79af37aeda WHIRLPOOL 0d23cae72db5224edb43452b0deab39a4a6333cd1d28f9f3e8f1831534c8261bc8440f53970223088fac59284733af69358847036cf0a7a7b868df6aaae7364d
+EBUILD phabricator-extensions-Sprint-9999.ebuild 1605 SHA256 94cb82a53b5877010fec570b0a537cd1bb6d5b090b18ce0501ec85ae9eca3145 WHIRLPOOL b545c4d8cb0600d8a857e649d4286a12af153fd560c61bf491cb7327864536d53cfc6951bfb4163df40b121526e15028f73356e34e04f5928da52d9814e32286
+MISC metadata.xml 256 SHA256 6ca43960767ca28661abf97c85263db77fe7643902be2ce777c61aa688d8ea2d WHIRLPOOL cef8582829111be09e651eb819e6d1ea59c9c4386b842169ccd46a14c8e3ccb090486fecd61c5fd4aa47998cacc69cdc1fb5ca6bb6325a4da1ebfd0b6eebda7b
diff --git a/www-apps/phabricator-extensions-Sprint/files/20160302-updates-to-upstream-46fb646f92b12a0031105d9fc9d67df6.patch b/www-apps/phabricator-extensions-Sprint/files/20160302-updates-to-upstream-46fb646f92b12a0031105d9fc9d67df6.patch
new file mode 100644
index 00000000..fd6da8fc
--- /dev/null
+++ b/www-apps/phabricator-extensions-Sprint/files/20160302-updates-to-upstream-46fb646f92b12a0031105d9fc9d67df6.patch
@@ -0,0 +1,162 @@
+From df6e9dee03e4dd0da551199df33b6d04bf096d32 Mon Sep 17 00:00:00 2001
+From: Christopher Johnson <christopher.johnson@wikimedia.de>
+Date: Mon, 11 Apr 2016 14:09:31 +0200
+Subject: [PATCH] updates to upstream 46fb646f92b12a0031105d9fc9d67df67f86dcd
+ Bug:T132239
+
+Change-Id: Ie407f643af7553db4d55ce0353c7399e1ad2b7e5
+---
+ src/customfield/SprintBeginDateField.php | 4 +++
+ src/storage/BoardDataProvider.php | 9 ++---
+ src/storage/SprintColumnTransaction.php | 59 ++++++++++++++++++--------------
+ src/view/burndown/SprintDataView.php | 2 +-
+ 4 files changed, 43 insertions(+), 31 deletions(-)
+
+diff --git a/src/customfield/SprintBeginDateField.php b/src/customfield/SprintBeginDateField.php
+index dcfe987..439d9f7 100644
+--- a/src/customfield/SprintBeginDateField.php
++++ b/src/customfield/SprintBeginDateField.php
+@@ -20,6 +20,10 @@ final class SprintBeginDateField extends SprintProjectCustomField {
+ return 'isdc:sprint:startdate';
+ }
+
++ public function getModernFieldKey() {
++ return 'startdate';
++ }
++
+ public function getFieldName() {
+ return 'Sprint Start Date';
+ }
+diff --git a/src/storage/BoardDataProvider.php b/src/storage/BoardDataProvider.php
+index 3a3729e..5efe05e 100644
+--- a/src/storage/BoardDataProvider.php
++++ b/src/storage/BoardDataProvider.php
+@@ -168,7 +168,7 @@ final class BoardDataProvider {
+ $scope_phid = $this->project->getPHID();
+ $task_phids = mpull($this->tasks, 'getPHID');
+ $query = new ManiphestTransactionQuery();
+- $query->withTransactionTypes(array(ManiphestTransaction::TYPE_PROJECT_COLUMN));
++ $query->withTransactionTypes(array(PhabricatorTransactions::TYPE_COLUMNS));
+ $query->withObjectPHIDs($task_phids);
+ $query->setViewer($this->viewer);
+ $col_xactions = $query->execute();
+@@ -176,9 +176,10 @@ final class BoardDataProvider {
+ $xaction_date = $xaction->getDateCreated();
+ if ($xaction_date >= $this->start && $xaction_date <= $this->end) {
+ $newval = $xaction->getNewValue();
+- if ($newval['projectPHID'] == $scope_phid) {
+- $xactions[] = $xaction;
+- }
++ $newArr = call_user_func_array('array_merge', $newval);
++ if ($newArr['boardPHID'] == $scope_phid) {
++ $xactions[] = $xaction;
++ }
+ }
+ }
+ return $xactions;
+diff --git a/src/storage/SprintColumnTransaction.php b/src/storage/SprintColumnTransaction.php
+index cfbfa09..a5de31f 100644
+--- a/src/storage/SprintColumnTransaction.php
++++ b/src/storage/SprintColumnTransaction.php
+@@ -63,7 +63,7 @@ final class SprintColumnTransaction {
+ break;
+ case 'reopen':
+ $this->reopenedTasksToday($date, $dates);
+- $this->reopenedPointsToday($date, $points, $dates);
++ // $this->reopenedPointsToday($date, $points, $dates);
+ break;
+ }
+ }
+@@ -91,24 +91,25 @@ final class SprintColumnTransaction {
+ }
+
+ private function setXActionEventType($old_col_name, $new_col_name) {
+- $old_is_closed = ($old_col_name === null) ||
+- SprintConstants::TYPE_CLOSED_STATUS_COLUMN == $old_col_name;
++ $old_is_closed = ($old_col_name = SprintConstants::TYPE_CLOSED_STATUS_COLUMN and $new_col_name != SprintConstants::TYPE_CLOSED_STATUS_COLUMN);
+
+ if ($old_is_closed) {
+ return 'reopen';
+- } else {
++ } else if ($new_col_name) {
+ switch ($new_col_name) {
+- case SprintConstants::TYPE_CLOSED_STATUS_COLUMN:
+- return 'close';
+- case SprintConstants::TYPE_REVIEW_STATUS_COLUMN:
+- return 'review';
+- case SprintConstants::TYPE_DOING_STATUS_COLUMN:
+- return 'doing';
+- case SprintConstants::TYPE_BACKLOG_STATUS_COLUMN:
+- return 'backlog';
+- default:
+- break;
++ case SprintConstants::TYPE_CLOSED_STATUS_COLUMN:
++ return 'close';
++ case SprintConstants::TYPE_REVIEW_STATUS_COLUMN:
++ return 'review';
++ case SprintConstants::TYPE_DOING_STATUS_COLUMN:
++ return 'doing';
++ case SprintConstants::TYPE_BACKLOG_STATUS_COLUMN:
++ return 'backlog';
++ default:
++ break;
+ }
++ } else {
++ return null;
+ }
+ }
+
+@@ -118,22 +119,28 @@ final class SprintColumnTransaction {
+ $new_col_name = null;
+ $events = array();
+ foreach ($xactions as $xaction) {
+- $old_col_phid = idx($xaction->getOldValue(), 'columnPHIDs');
+- foreach ($old_col_phid as $phid) {
+- $old_col = $this->query->getColumnforPHID($phid);
+- foreach ($old_col as $obj) {
+- $old_col_name = $obj->getDisplayName();
++ $oldval = $xaction->getOldValue();
++ if (!empty($oldval)) {
++ $newArr = call_user_func_array('array_merge', $oldval);
++ $old_col_phid = idx($newArr, 'columnPHID');
++ foreach ($old_col_phid as $phid) {
++ $old_col = $this->query->getColumnforPHID($phid);
++ foreach ($old_col as $obj) {
++ $old_col_name = $obj->getDisplayName();
++ }
+ }
+ }
+- $new_col_phid = idx($xaction->getNewValue(), 'columnPHIDs');
+- foreach ($new_col_phid as $phid) {
+- $new_col = $this->query->getColumnforPHID($phid);
+- foreach ($new_col as $obj) {
+- $new_col_name = $obj->getDisplayName();
+- }
++ $newval = $xaction->getNewValue();
++ if (!empty($newval)) {
++ $newArr = call_user_func_array('array_merge', $newval);
++ $new_col_phid = idx($newArr, 'columnPHID');
++ $xaction_scope_phid = idx($newArr, 'boardPHID');
++ $new_col = $this->query->getColumnforPHID($new_col_phid);
++ foreach ($new_col as $obj) {
++ $new_col_name = $obj->getDisplayName();
++ }
+ }
+ $scope_phid = $this->project->getPHID();
+- $xaction_scope_phid = idx($xaction->getNewValue(), 'projectPHID');
+ if ($scope_phid == $xaction_scope_phid) {
+ $event_type = $this->setXActionEventType($old_col_name, $new_col_name);
+ if ($event_type !== null) {
+diff --git a/src/view/burndown/SprintDataView.php b/src/view/burndown/SprintDataView.php
+index 4b4b06d..67b1d37 100644
+--- a/src/view/burndown/SprintDataView.php
++++ b/src/view/burndown/SprintDataView.php
+@@ -19,7 +19,7 @@ final class SprintDataView extends SprintView {
+ return $this;
+ }
+
+- public function setViewer($viewer) {
++ public function setViewer(PhabricatorUser $viewer) {
+ $this->viewer = $viewer;
+ return $this;
+ }
diff --git a/www-apps/phabricator-extensions-Sprint/metadata.xml b/www-apps/phabricator-extensions-Sprint/metadata.xml
new file mode 100644
index 00000000..b5e02a8f
--- /dev/null
+++ b/www-apps/phabricator-extensions-Sprint/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>bertrand@jacquin.bzh</email>
+ <name>Bertrand Jacquin</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20160302.ebuild b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20160302.ebuild
new file mode 100644
index 00000000..fd172f7b
--- /dev/null
+++ b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20160302.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit git-r3
+
+DESCRIPTION="Manage your tasks with Points in Phabricator"
+HOMEPAGE="Manage your tasks with Points in Phabricator"
+EGIT_REPO_URI="git://github.com/wikimedia/${PN}.git"
+EGIT_BRANCH="production"
+EGIT_COMMIT="release/2016-03-02/1"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+DEPEND=""
+RDEPEND="dev-php/libphutil
+ www-apps/phabricator"
+
+src_prepare() {
+ git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO"
+
+ epatch "${FILESDIR}/${PV}-updates-to-upstream-46fb646f92b12a0031105d9fc9d67df6.patch"
+
+ find -type f -name .gitignore -print0 \
+ | xargs -0 --no-run-if-empty -- \
+ rm
+
+ # Replace 'env' shebang to files it point to
+ find -type f \
+ | sort \
+ | xargs -n 1 --no-run-if-empty -- \
+ awk 'NR == 1 && /^#!\/usr\/bin\/env/ {print FILENAME}' \
+ | while read ; do
+ set -- $(sed -ne '1 s:^#!\([^ ]*\) ::p;q' ${REPLY})
+ cmd="$1" ; shift ; args="$@"
+
+ case "${cmd}" in
+ bash|php) ;;
+ *) continue ;;
+ esac
+
+ path="$(type -p ${cmd})" || continue
+ [[ -z "${path}" ]] && continue
+
+ einfo "Changing ${REPLY} shebang to #!${path} ${args}"
+ sed -i \
+ -e "1 s:^#!.*:#!${path} ${args}:" \
+ "${REPLY}"
+ eend $?
+ done
+}
+
+src_test() {
+ arc unit --everything --no-coverage || die "arc unit failed"
+}
+
+src_install() {
+ insinto "/usr/share/${PN}"
+ doins GIT_COMMIT_INFO
+
+ insinto "/usr/share/php/${PN}"
+ doins -r rsrc scripts src
+
+ # Make executable all shebanged files
+ find "${ED}" -type f \
+ | xargs -n 1 --no-run-if-empty -- \
+ awk 'NR == 1 && /^#!/ {print FILENAME}' \
+ | sed -e "s:${ED}:/:" \
+ | xargs --no-run-if-empty -- \
+ fperms 755
+
+ dodoc README.md RELEASE_NOTES.md
+}
+
+pkg_postinst () {
+ elog
+ elog "After the first installation, you need to run:"
+ elog " cd /path/to/phabricator/install"
+ elog " bin/config set load-libraries '{\"sprint\":\"${EROOT}usr/share/php/${PN}/src\"}'"
+}
diff --git a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild
new file mode 100644
index 00000000..5f717acb
--- /dev/null
+++ b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit git-r3
+
+DESCRIPTION="Manage your tasks with Points in Phabricator"
+HOMEPAGE="Manage your tasks with Points in Phabricator"
+EGIT_REPO_URI="git://github.com/wikimedia/${PN}.git"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="test"
+
+DEPEND=""
+RDEPEND="dev-php/libphutil
+ www-apps/phabricator"
+
+src_prepare() {
+ git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO"
+
+ find -type f -name .gitignore -print0 \
+ | xargs -0 --no-run-if-empty -- \
+ rm
+
+ # Replace 'env' shebang to files it point to
+ find -type f \
+ | sort \
+ | xargs -n 1 --no-run-if-empty -- \
+ awk 'NR == 1 && /^#!\/usr\/bin\/env/ {print FILENAME}' \
+ | while read ; do
+ set -- $(sed -ne '1 s:^#!\([^ ]*\) ::p;q' ${REPLY})
+ cmd="$1" ; shift ; args="$@"
+
+ case "${cmd}" in
+ bash|php) ;;
+ *) continue ;;
+ esac
+
+ path="$(type -p ${cmd})" || continue
+ [[ -z "${path}" ]] && continue
+
+ einfo "Changing ${REPLY} shebang to #!${path} ${args}"
+ sed -i \
+ -e "1 s:^#!.*:#!${path} ${args}:" \
+ "${REPLY}"
+ eend $?
+ done
+}
+
+src_test() {
+ arc unit --everything --no-coverage || die "arc unit failed"
+}
+
+src_install() {
+ insinto "/usr/share/${PN}"
+ doins GIT_COMMIT_INFO
+
+ insinto "/usr/share/php/${PN}"
+ doins -r rsrc scripts src
+
+ # Make executable all shebanged files
+ find "${ED}" -type f \
+ | xargs -n 1 --no-run-if-empty -- \
+ awk 'NR == 1 && /^#!/ {print FILENAME}' \
+ | sed -e "s:${ED}:/:" \
+ | xargs --no-run-if-empty -- \
+ fperms 755
+
+ dodoc README.md RELEASE_NOTES.md
+}