MCPcopy Create free account
hub / github.com/Rello/analytics / getTemplate

Method getTemplate

lib/Datasource/Github.php:49–97  ·  view source on GitHub ↗

* @return array available options of the data source */

()

Source from the content-addressed store, hash-verified

47 * @return array available options of the data source
48 */
49 public function getTemplate(): array {
50 $template = array();
51 $template[] = ['id' => 'user', 'name' => 'GitHub Username', 'placeholder' => 'GitHub user'];
52 $template[] = ['id' => 'repository', 'name' => 'Repository / package', 'placeholder' => 'GitHub repository or package'];
53 $template[] = [
54 'id' => 'data',
55 'name' => 'Releases, Packages, Issues or PRs',
56 // TRANSLATORS: Noun: published versions of a GitHub project.
57 'placeholder' => 'release-' . $this->l10n->t('Releases')
58 // TRANSLATORS: Noun: software packages hosted by GitHub.
59 . '/package-' . $this->l10n->t('Packages')
60 // TRANSLATORS: Noun: GitHub issue tickets.
61 . '/issues-' . $this->l10n->t('Issues')
62 // TRANSLATORS: Noun: proposed code changes on GitHub.
63 . '/pulls-' . $this->l10n->t('Pull Requests'),
64 'type' => 'tf'
65 ];
66 $template[] = [
67 'id' => 'limit',
68 // TRANSLATORS: Noun: maximum number of datasource rows to retrieve.
69 'name' => $this->l10n->t('Limit'),
70 'placeholder' => $this->l10n->t('Number of rows'),
71 'type' => 'number'
72 ];
73 $template[] = [
74 'id' => 'timestamp',
75 'name' => $this->l10n->t('Timestamp of data load'),
76 'placeholder' => 'false-' . $this->l10n->t('No') . '/true-' . $this->l10n->t('Yes'),
77 'type' => 'tf'
78 ];
79 $template[] = ['id' => 'section', 'name' => $this->l10n->t('More options'), 'type' => 'section'];
80 $template[] = [
81 'id' => 'filter',
82 'name' => $this->l10n->t('Filter release assets via extension'),
83 'placeholder' => 'zip,gz'
84 ];
85 $template[] = [
86 'id' => 'showAssets',
87 'name' => $this->l10n->t('Show assets'),
88 'placeholder' => 'false-' . $this->l10n->t('No') . '/true-' . $this->l10n->t('Yes'),
89 'type' => 'tf'
90 ];
91 $template[] = [
92 'id' => 'token',
93 'name' => $this->l10n->t('Personal access token'),
94 'placeholder' => $this->l10n->t('optional')
95 ];
96 return $template;
97 }
98
99 /**
100 * @return array<string, array<string, mixed>>

Callers

nothing calls this directly

Calls 1

tMethod · 0.45

Tested by

no test coverage detected