Nouveau plugin : Github

Bonjour à tous,

Je viens de publier en beta sur le market, la première version de mon plugin pour Github.
Ce plugin permet de récupérer les informations de votre compte Github ainsi que celles de vos différents repositories.

Chaque repository est traité comme un équipement avec ses propres commandes.
Vous pouvez choisir quels type de repositories vous voulez récupérer (public, private, forks).
Pour chaque repository, plusieurs informations sont disponibles (nb de watchers, d’issues, de pull-requests) et sont historisées.

Quelques screenshots:

image

Merci à @vedrine et son plugin Livebox duquel je me suis inspiré pour celui-ci!

Merci pour vos retours!

github_icon

2 « J'aime »

Bonjour à tous,

Le plugin vient d’être publié en version stable :slight_smile:

Hugo.

2 « J'aime »

Bonjour @hugoKs3,

J’ai une erreur bloquante a la collecte des Repositories :

`[MySQL] Error code : 23000 (1062). Duplicate entry 'coincoin-4' for key 'unique' : INSERT INTO `eqLogic` SET `id` = :id, `name` = :name, `logicalId` = :logicalId, `generic_type` = :generic_type, `object_id` = :object_id, `eqType_name` = :eqType_name, `isVisible` = :isVisible, `isEnable` = :isEnable, `configuration` = :configuration, `timeout` = :timeout, `category` = :category, `display` = :display, `order` = :order, `comment` = :comment, `tags` = :tags` 

L’erreur apparait dans le centre de message de Jeedom comme ceci :

Erreur sur github::pull() : Exception Object ( [message:protected] => [MySQL] Error code : 23000 (1062). Duplicate entry 'coincoin-4' for key 'unique' : INSERT INTO `eqLogic` SET `id` = :id, `name` = :name, `logicalId` = :logicalId, `generic_type` = :generic_type, `object_id` = :object_id, `eqType_name` = :eqType_name, `isVisible` = :isVisible, `isEnable` = :isEnable, `configuration` = :configuration, `timeout` = :timeout, `category` = :category, `display` = :display, `order` = :order, `comment` = :comment, `tags` = :tags [string:Exception:private] => [code:protected] => 0 [file:protected] => /var/www/html/core/class/DB.class.php [line:protected] => 101 [trace:Exception:private] => Array ( [0] => Array ( [file] => /var/www/html/core/class/DB.class.php [line] => 179 [function] => Prepare [class] => DB [type] => :: [args] => Array ( [0] => INSERT INTO `eqLogic` SET `id` = :id, `name` = :name, `logicalId` = :logicalId, `generic_type` = :generic_type, `object_id` = :object_id, `eqType_name` = :eqType_name, `isVisible` = :isVisible, `isEnable` = :isEnable, `configuration` = :configuration, `timeout` = :timeout, `category` = :category, `display` = :display, `order` = :order, `comment` = :comment, `tags` = :tags [1] => Array ( [id] => [name] => coincoin [logicalId] => 353826972 [generic_type] => [object_id] => 4 [eqType_name] => github [isVisible] => 1 [isEnable] => 1 [configuration] => {"type":"repo","account":"SWRJEEDOM","image":"plugins\/github\/core\/assets\/repo_icon.png","createtime":"2021-04-03 14:00:09"} [timeout] => [category] => [] [display] => {"height":"225px","width":"280px"} [order] => 9999 [comment] => [tags] => ) [2] => 0 ) ) [1] => Array ( [file] => /var/www/html/core/class/eqLogic.class.php [line] => 966 [function] => save [class] => DB [type] => :: [args] => Array ( [0] => github Object ( [id:protected] => [name:protected] => coincoin [logicalId:protected] => 353826972 [generic_type:protected] => [object_id:protected] => 4 [eqType_name:protected] => github [isVisible:protected] => 1 [isEnable:protected] => 1 [configuration:protected] => Array ( [type] => repo [account] => SWRJEEDOM [image] => plugins/github/core/assets/repo_icon.png [createtime] => 2021-04-03 14:00:09 ) [timeout:protected] => 0 [category:protected] => [display:protected] => Array ( [height] => 225px [width] => 280px ) [order:protected] => 9999 [comment:protected] => [tags:protected] => [_debug:protected] => [_object:protected] => [_needRefreshWidget:protected] => 1 [_timeoutUpdated:protected] => [_batteryUpdated:protected] => [_changed:protected] => 1 ) [1] => ) ) [2] => Array ( [file] => /var/www/html/plugins/github/core/class/github.class.php [line] => 68 [function] => save [class] => eqLogic [type] => -> [args] => Array ( ) ) [3] => Array ( [file] => /var/www/html/plugins/github/core/class/github.class.php [line] => 415 [function] => createRepo [class] => github [type] => :: [args] => Array ( [0] => stdClass Object ( [id] => 353826972 [node_id] => MDEwOlJlcG9zxxxxxxxxxxx5NzI= [name] => coincoin [full_name] => SWRJEEDOM/coincoin [private] => [owner] => stdClass Object ( [login] => SWRJEEDOM [id] => 30535355 [node_id] => MDQ6VXNlcjMwNTM1MzU1 [avatar_url] => https://avatars.githubusercontent.com/u/30535355?v=4 [gravatar_id] => [url] => https://api.github.com/users/SWRJEEDOM [html_url] => https://github.com/SWRJEEDOM [followers_url] => https://api.github.com/users/SWRJEEDOM/followers [following_url] => https://api.github.com/users/SWRJEEDOM/following{/other_user} [gists_url] => https://api.github.com/users/SWRJEEDOM/gists{/gist_id} [starred_url] => https://api.github.com/users/SWRJEEDOM/starred{/owner}{/repo} [subscriptions_url] => https://api.github.com/users/SWRJEEDOM/subscriptions [organizations_url] => https://api.github.com/users/SWRJEEDOM/orgs [repos_url] => https://api.github.com/users/SWRJEEDOM/repos [events_url] => https://api.github.com/users/SWRJEEDOM/events{/privacy} [received_events_url] => https://api.github.com/users/SWRJEEDOM/received_events [type] => User [site_admin] => ) [html_url] => https://github.com/SWRJEEDOM/coincoin [description] => [fork] => [url] => https://api.github.com/repos/SWRJEEDOM/coincoin [forks_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/forks [keys_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/keys{/key_id} [collaborators_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/collaborators{/collaborator} [teams_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/teams [hooks_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/hooks [issue_events_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/issues/events{/number} [events_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/events [assignees_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/assignees{/user} [branches_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/branches{/branch} [tags_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/tags [blobs_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/git/blobs{/sha} [git_tags_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/git/tags{/sha} [git_refs_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/git/refs{/sha} [trees_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/git/trees{/sha} [statuses_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/statuses/{sha} [languages_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/languages [stargazers_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/stargazers [contributors_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/contributors [subscribers_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/subscribers [subscription_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/subscription [commits_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/commits{/sha} [git_commits_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/git/commits{/sha} [comments_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/comments{/number} [issue_comment_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/issues/comments{/number} [contents_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/contents/{+path} [compare_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/compare/{base}...{head} [merges_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/merges [archive_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/{archive_format}{/ref} [downloads_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/downloads [issues_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/issues{/number} [pulls_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/pulls{/number} [milestones_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/milestones{/number} [notifications_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/notifications{?since,all,participating} [labels_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/labels{/name} [releases_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/releases{/id} [deployments_url] => https://api.github.com/repos/SWRJEEDOM/coincoin/deployments [created_at] => 2021-04-01T21:07:38Z [updated_at] => 2021-04-02T18:10:03Z [pushed_at] => 2021-04-02T18:10:01Z [git_url] => git://github.com/SWRJEEDOM/coincoin.git [ssh_url] => git@github.com:SWRJEEDOM/coincoin.git [clone_url] => https://github.com/SWRJEEDOM/coincoin.git [svn_url] => https://github.com/SWRJEEDOM/coincoin [homepage] => [size] => 66 [stargazers_count] => 0 [watchers_count] => 0 [language] => PHP [has_issues] => 1 [has_projects] => 1 [has_downloads] => 1 [has_wiki] => 1 [has_pages] => [forks_count] => 0 [mirror_url] => [archived] => [disabled] => [open_issues_count] => 0 [license] => stdClass Object ( [key] => gpl-2.0 [name] => GNU General Public License v2.0 [spdx_id] => GPL-2.0 [url] => https://api.github.com/licenses/gpl-2.0 [node_id] => MDc6TGljZW5zZTg= ) [forks] => 0 [open_issues] => 0 [watchers] => 0 [default_branch] => main [permissions] => stdClass Object ( [admin] => 1 [push] => 1 [pull] => 1 ) ) [1] => SWRJEEDOM ) ) [4] => Array ( [file] => /var/www/html/plugins/github/core/class/github.class.php [line] => 359 [function] => refreshInfo [class] => github [type] => -> [args] => Array ( ) ) [5] => Array ( [file] => /var/www/html/plugins/github/core/class/github.class.php [line] => 29 [function] => scan [class] => github [type] => -> [args] => Array ( ) ) [6] => Array ( [file] => /var/www/html/core/php/jeeCron.php [line] => 78 [function] => pull [class] => github [type] => :: [args] => Array ( ) ) ) [previous:Exception:private] => )