diff --git a/cli/phab-tag.php b/cli/phab-tag.php new file mode 100755 index 0000000..03997b1 --- /dev/null +++ b/cli/phab-tag.php @@ -0,0 +1,36 @@ +#!/usr/bin/php + ClickUp bot +# Copyright (C) 2023 Valerio Bozzolan, contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +/** + * Receive Phabricator/Phorge Tag info + */ + +// autoload libraries +require __DIR__ . '/../autoload.php'; + +$phab_tag_id = $argv[1] ?? null; + +if( !$phab_tag_id ) { + echo "RTFM\n"; + exit; +} + +$phab_task_details = PhabricatorAPI::querySingleProjectBySlug( $phab_tag_id ); + +echo print_r( $phab_task_details, JSON_PRETTY_PRINT ); +echo "\n";