Ejemplo n.º 1
0
        /// <summary>
        /// The main.
        /// </summary>
        /// <param name="args">
        /// The args.
        /// </param>
        private static void Main(string[] args)
        {
            // --------------------------------------------------------------------//
            // Don't change this from scimonshouse.net or you'll leak credentials! //
            // This is an internal-only development install
            // --------------------------------------------------------------------//
            string phabUrl = "https://phabricator.stwalkerster.co.uk/";

            phabUrl = "https://fab.scimonshouse.net/";

            string token = "api-pthzak4snefxww3rzllecspgilpj";


            token = "api-rul3ssevvzaedtdqxhdhg6sfzajv";

            var client = new ConduitClient(phabUrl, token);

            var maniphest = new Maniphest(client);

            var constraint = ManiphestSearchConstraintFactory.Statuses(new List <string> {
                "open"
            });
            var searchConstraints = new List <ApplicationEditorSearchConstraint> {
                constraint
            };
            IEnumerable <ManiphestTask> response = maniphest.Search(constraints: searchConstraints).ToList();
        }
Ejemplo n.º 2
0
        public BugReporter(IAppConfiguration appConfig, ILogger logger)
        {
            this.logger = logger;
            var url = appConfig.PhabUrl;
            var key = appConfig.PhabToken;

            if (string.IsNullOrWhiteSpace(url) || string.IsNullOrWhiteSpace(key))
            {
                this.active = false;
                return;
            }

            this.active = true;

            var conduitClient = new ConduitClient(url, key);

            this.maniphest = new Maniphest(conduitClient);

            var phidLookup = new PHIDLookup(conduitClient);

            this.projectPhid = phidLookup.GetPHIDForObject("#eits")["#eits"];
        }