Phabricator/机器人

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Phabricator/Bots and the translation is 61% complete.

Other languages:
English • ‎dansk • ‎español • ‎polski • ‎português • ‎हिन्दी • ‎中文 • ‎日本語

Phabricator bots are users in Phabricator for whom actions are automated or are a consequence of the actions of multiple users. See the upstream documentation for more information.

Phabricator bots are similar to MediaWiki bots, and much of the general Wikimedia bot policy is relevant to them.

Check the list of bots registered in phabricator.wikimedia.org.

从个人账户中拆分机器人账户

A personal user account is not appropriate for repetitive patterns of activity, as in the human case they would almost universally be considered spam, or at best be locked into someone's personal account. Activity that originates from a specific account that appears to be spam may require the account to be disabled or deleted. In these instances, if the offending account is also the personal account of a user, they will not be able to appeal or explain the situation.

获取机器人

Unlike regular Phabricator accounts, which are tied to a Wikimedia SUL or LDAP account, bot accounts are created natively in Phabricator. In order to request a bot account, please create a task under the Phabricator-Bot-Requests project with the following details:

  • 名字
  • 目的
  • 电子邮件地址(可能无效但必须是唯一的)
  • 负责的用户或组织

Phabricator管理员:执行步骤

Phabricator管理员创建此类帐户的步骤:

  • 创建bot用户
  • 为了透明,请将人类所有者添加到机器人帐户描述
  • Go to "Edit Settings", go to "Conduit API Tokens", click "Generate Token". 复制该令牌。
  • Create paste containing that token and set "View policy" to human owner and yourself
  • 粘贴创建请求任务中的链接,并要求人类所有者在任务按预期工作后关闭该任务

Bot账户持有人:执行的步骤

以下是配置arc以使用机器人帐户的步骤。

  • 获取机器人的帐户证书
  • 创建与以下内容匹配的弧配置文件,将“<您的机器人帐户ID>”和“<您的机器人证书>”替换为适当的值。
 {
   "config": {
     "default": "https:\/\/phabricator.wikimedia.org\/"
   },
   "hosts": {
     "https:\/\/phabricator.wikimedia.org\/api\/": {
       "token": "api-token_which_starts_with_api"
     }
   }
 }
  • 将文件保存在某处。 The default location arc looks is ".arcrc" in your home directory (~/.arcrc on Linux and Mac), but if you already have an arcrc file on the machine you're testing with, you may prefer to save it elsewhere. For purposes of this example, we'll use "bot.arcrc" in the current working directory.
  • 运行以下命令作为测试:
 $ arc tasks --unassigned --limit 1 --arcrc-file bot.arcrc

这应该返回Maniphest中单个任务的简短摘要。