Phabricator/Boty

From mediawiki.org
This page is a translated version of the page Phabricator/Bots and the translation is 52% complete.
Outdated translations are marked like this.

Boty na Phabricator są użytkownikami, którzy wykonują zautomatyzowane akcje lub są to akcje będące skutkami działań większej grupy użytkowników. Zobacz nadrzędną dokumentację po więcej informacji.

Boty Phabricatora są podobne do botów MediaWiki i obowiązuje je większość ogólnej polityki botów Wikimedia.

Zobacz listę botów zarejestrowanych na phabricator.wikimedia.org.

Oddzielanie kont botów od kont osobistych

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.

Acquiring a bot

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:

  • Nazwa
  • Przeznaczenie
  • Adres e-mail (może być nieprawidłowy ale musi być unikalny)
  • Odpowiedzialny za niego użytkownik lub organizacja

Dla administratorów Phabricator: Kroki do wykonania

Kroki do wykonania przez administratorów Phabricatora, aby utworzyć takie konto:

  • Przejdź do "Edit Settings", dalej do "Conduit API Tokens", kliknij "Generate API Token".

Skopiuj ten token.

  • [$url Utwórz wklejkę] zawierającą ten token i ustaw "View policy" (polityka widoku) dla siebie i właściciela bota
  • Wklej link w zadaniu, w którym poproszono o bota i poproś właściciela bota o zamknięcie zadania, gdy już proces będzie należycie dopełniony

Właściciele kont botów: Kroki do wykonania

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.