Phabricator/ボット

From mediawiki.org
This page is a translated version of the page Phabricator/Bots and the translation is 52% complete.

Phabricatorのボットは、Phabricatorの利用者で、活動が自動化されて、または複数のユーザーの活動の結果となっています。 詳しくは、アップストリームのドキュメントを参照してください。

PhabricatorのボットはMediaWikiのボットに似ていて、一般的なWikimediaのボットの方針の多くがそれらに関連しています。

phabricator.wikimedia.org に登録されているボットの一覧を確認してください。

ボットアカウントの個人のアカウントからの分離

個人の利用者のアカウントは、人間なら多くの場合スパムと見なされるか、せいぜい誰かの個人アカウントにロックされるので、繰り返しのパターン活動には向いていません。 スパムらしき特定のアカウントによる活動は、そのアカウントを無効化するか削除することを要する場合があります。 このような例では、問題のあるアカウントが利用者の個人用アカウントでもある場合、利用者が状況を主張したり説明したりすることができません。

ボットの入手

ウィキメディアSULまたはLDAPのアカウントに紐づけられた普通のPhabricatorアカウントとは異なり、ボットアカウントは元からPhabricatorで作成されます。 ボットアカウントをリクエストするには、下記の内容を含んだタスクをPhabricator-Bot-Requestsプロジェクトの下に作成してください

  • 名前
  • 目的
  • メールアドレス(無効になる可能性がありますが、一意でなければなりません)
  • 責任者となる利用者または団体

Phabricator admins: Steps to perform

Steps for Phabricator admins to create such an account:

  • For transparency, add human owner to bot account description
  • Go to "Manage", go to "Edit Settings", go to "Conduit API Tokens", click "Generate Token".

Copy that token.

  • Create paste containing that token and set "View policy" to human owner and yourself
  • Paste link in the creation request task and ask human owner to close the task once it works as expected

Bot account holders: Steps to perform

These are the steps to configure arc to use your bot account.

  • Acquire account certificate for your bot
  • Create an arc configuration file matching the following, replacing "<your bot account id>" and "<your bot certificate>" with the appropriate values.
 {
   "config": {
     "default": "https:\/\/phabricator.wikimedia.org\/"
   },
   "hosts": {
     "https:\/\/phabricator.wikimedia.org\/api\/": {
       "token": "api-token_which_starts_with_api"
     }
   }
 }
  • Save this file somewhere.

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.

  • Run the following command as a test:
 $ arc tasks --unassigned --limit 1 --arcrc-file bot.arcrc

This should return a short summary of a single task out of Maniphest.