Page MenuHomePhabricator

Expose project icons and other metadata through project.query
Closed, ResolvedPublic

Description

At the wikimedia phabricator instance, we use icons to distinguish project types. For our IRC bot, we'd like to filter on project type, but icons are not exposed through project.query.

Other metadata that is currently not exposed includes

  • project color
  • visible to/editable by/joinable by
  • description
  • watchers
  • flagged or not, and with which color

Event Timeline

valhallasw raised the priority of this task from to Needs Triage.
valhallasw updated the task description. (Show Details)

(Ooops, I wasn't aware that this is upstream and not Wikimedia's Phabricator. Anyway, the comment is still relevant.)

I think you want to filter by project ID, adding projects explicitly to a whitelist, and not on project type. Icons and colors alone won't tell you whether a task is on or off-topic for wikibugs.

Just to clarify, it's not for filtering tasks, but for filtering which projects are included in the IRC message. Thatt is, we'd like the format to be

<list of projects>: <title> - <link> (<user>) <description of change>

not

<list of all tags>: <title> - <link> (<user>) <description of change>

(e.g.

22:42 <wikibugs2> Community-Engagement, ECT-November-2014, Engineering-Community, ECT-October-2014, Bugzilla-Migration, RT-Migration: Communicate the launch of Wikimedia Phabricator Day 1 - https://phabricator.wikimedia.org/T188#20055 (Whatamidoing-WMF) Scheduling IRC office hours is very easy: you just add yours to the list...

should be

22:42 <wikibugs2> Bugzilla-Migration, RT-Migration: Communicate the launch of Wikimedia Phabricator Day 1 - https://phabricator.wikimedia.org/T188#20055 (Whatamidoing-WMF) Scheduling IRC office hours is very easy: you just add yours to the list...

at least in the regular IRC channels.

Thanks for the quick clarification. I understand now.

  • T5873 discusses general treatment of edge relationships, like watchers.
  • Flags can already be queried with flag.query. They're also personal to the viewer. We're unlikely to expose them by default in other application query methods.
  • Description is a CustomField and covered by T5873.
  • Color and icon are primary fields, straightforward to expose, and uncontentious (except possibly that the internal icon name is prefixed with "fa-" for "FontAwesome", which feels like somewhat of an implementation detail). I'd be happy to accept a diff to add them to both the parameters and output in advance of T5873.
  • Policies are also primary fields and straightforward, but there's generally no way to query for policy information after you have them. You can recognize common policies (public/users) but can't decode a custom policy over the API right now. So probably this is an easy first have and then an involved second half.

After D15105:

  • Colors, icons and policies and custom fields are available via project.search.
  • Members and watchers are available via project.search by querying for appropriate attachments.

Flags have always been available via flag.query. Flags are personal to the viewer, so I do not plan to expose flag information in other applications' API methods.

epriestley triaged this task as Normal priority.