├── .eslintrc.yaml
├── .gitignore
├── LICENSE
├── README.md
├── babel.config.js
├── card.png
├── dist
├── github-card.js
└── github-card.js.map
├── hacs.json
├── package.json
├── src
├── defaults.js
├── index-editor.js
├── index.js
├── style-editor.js
└── style.js
└── webpack
├── config.common.js
├── config.dev.js
└── config.prod.js
/.eslintrc.yaml:
--------------------------------------------------------------------------------
1 | extends: airbnb-base
2 | rules:
3 | no-else-return: 0
4 | no-underscore-dangle: 0
5 | nonblock-statement-body-position: 0
6 | curly: 0
7 | no-return-assign: 0
8 | consistent-return: 0
9 | no-mixed-operators: 0
10 | class-methods-use-this: 0
11 | no-nested-ternary: 0
12 | camelcase: 0
13 | globals:
14 | window: true
15 | Event: true
16 | customElements: true
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | package-lock.json
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Leonardo Merza
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Github Card for Home Assistant
2 | Show issues, pull requests, and more for your github repositories
3 |
4 |
5 |
6 | [![GitHub Release][releases-shield]][releases]
7 | [![License][license-shield]](LICENSE.md)
8 | ![Project Maintenance][maintenance-shield]
9 | [](https://github.com/custom-components/hacs)
10 |
11 | ## Installation through [HACS](https://github.com/custom-components/hacs)
12 | ---
13 | Add the following to resources in your lovelace config:
14 |
15 | ```yaml
16 | resources:
17 | - url: /community_plugin/github-card/github-card.js
18 | type: js
19 | ```
20 |
21 | ## Configurations:
22 | ---
23 | ```yaml
24 | type: custom:github-card
25 | entities:
26 | - sensor.calendar_card
27 | - sensor.waze_card
28 | - sensor.light_entity_card
29 | ```
30 |
31 | ## Options
32 | ---
33 | | Name | Type | Requirement | `Default` Description
34 | | :---- | :---- | :------- | :----------- |
35 | | title | string | **Optional** | `Github` Change card title
36 | | entities | list | **Required** | List of github sensors to display
37 | | show_extended | boolean | **Optional** | `true` Show/hide tags, forks, and commits links
38 | | show_github_icon | boolean | **Optional** | `true` Show/hide Github icon
39 |
40 | ---
41 |
42 | Enjoy my card? Help me out for a couple of :beers: or a :coffee:!
43 |
44 | [](https://www.buymeacoffee.com/JMISm06AD)
45 |
46 |
47 | [commits-shield]: https://img.shields.io/github/commit-activity/y/ljmerza/github-card.svg?style=for-the-badge
48 | [commits]: https://github.com/ljmerza/github-card/commits/master
49 | [license-shield]: https://img.shields.io/github/license/ljmerza/github-card.svg?style=for-the-badge
50 | [maintenance-shield]: https://img.shields.io/badge/maintainer-Leonardo%20Merza%20%40ljmerza-blue.svg?style=for-the-badge
51 | [releases-shield]: https://img.shields.io/github/release/ljmerza/github-card.svg?style=for-the-badge
52 | [releases]: https://github.com/ljmerza/github-card/releases
53 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "useBuiltIns": "usage",
7 | "debug": true,
8 | "targets": "> 0.25%, not dead",
9 | "shippedProposals": true
10 | }
11 | ]
12 | ]
13 | }
--------------------------------------------------------------------------------
/card.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ljmerza/github-card/7e4c6285145259ede63c08c63187d8e9a8ab6f5b/card.png
--------------------------------------------------------------------------------
/dist/github-card.js:
--------------------------------------------------------------------------------
1 | !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/local/",n(n.s=116)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(35)("wks"),i=n(24),o=n(0).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(2);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(6)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(3),i=n(65),o=n(36),a=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(0),i=n(13),o=n(9),a=n(24)("src"),s=n(86),u=(""+s).split("toString");n(19).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(o(n,a)||i(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,n){var r=n(0),i=n(19),o=n(13),a=n(7),s=n(14),u=function(t,e,n){var c,l,f,p,h=t&u.F,d=t&u.G,v=t&u.S,y=t&u.P,g=t&u.B,m=d?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,_=d?i:i[e]||(i[e]={}),b=_.prototype||(_.prototype={});for(c in d&&(n=e),n)f=((l=!h&&m&&void 0!==m[c])?m:n)[c],p=g&&l?s(f,r):y&&"function"==typeof f?s(Function.call,f):f,m&&a(m,c,f,t&u.U),_[c]!=f&&o(_,c,p),y&&b[c]!=f&&(b[c]=f)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){for(var r=n(11),i=n(28),o=n(7),a=n(0),s=n(13),u=n(33),c=n(1),l=c("iterator"),f=c("toStringTag"),p=u.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(h),v=0;v=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(41),i={};i[n(1)("toStringTag")]="z",i+""!="[object z]"&&n(7)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(5),i=n(25);t.exports=n(4)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(20);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){n(63)("asyncIterator")},function(t,e,n){"use strict";var r=n(0),i=n(9),o=n(4),a=n(8),s=n(7),u=n(26).KEY,c=n(6),l=n(35),f=n(27),p=n(24),h=n(1),d=n(64),v=n(63),y=n(87),g=n(67),m=n(3),_=n(2),b=n(31),x=n(21),w=n(36),S=n(25),k=n(32),O=n(91),E=n(39),P=n(52),j=n(5),N=n(28),T=E.f,C=j.f,A=O.f,L=r.Symbol,R=r.JSON,M=R&&R.stringify,F=h("_hidden"),I=h("toPrimitive"),$={}.propertyIsEnumerable,V=l("symbol-registry"),U=l("symbols"),z=l("op-symbols"),G=Object.prototype,W="function"==typeof L&&!!P.f,D=r.QObject,q=!D||!D.prototype||!D.prototype.findChild,B=o&&c(function(){return 7!=k(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=T(G,e);r&&delete G[e],C(t,e,n),r&&t!==G&&C(G,e,r)}:C,H=function(t){var e=U[t]=k(L.prototype);return e._k=t,e},J=W&&"symbol"==typeof L.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof L},K=function(t,e,n){return t===G&&K(z,e,n),m(t),e=w(e,!0),m(n),i(U,e)?(n.enumerable?(i(t,F)&&t[F][e]&&(t[F][e]=!1),n=k(n,{enumerable:S(0,!1)})):(i(t,F)||C(t,F,S(1,{})),t[F][e]=!0),B(t,e,n)):C(t,e,n)},Y=function(t,e){m(t);for(var n,r=y(e=x(e)),i=0,o=r.length;o>i;)K(t,n=r[i++],e[n]);return t},X=function(t){var e=$.call(this,t=w(t,!0));return!(this===G&&i(U,t)&&!i(z,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,F)&&this[F][t])||e)},Q=function(t,e){if(t=x(t),e=w(e,!0),t!==G||!i(U,e)||i(z,e)){var n=T(t,e);return!n||!i(U,e)||i(t,F)&&t[F][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=A(x(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==F||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===G,r=A(n?z:x(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(G,e)||o.push(U[e]);return o};W||(s((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===G&&e.call(z,n),i(this,F)&&i(this[F],t)&&(this[F][t]=!1),B(this,t,S(1,n))};return o&&q&&B(G,t,{configurable:!0,set:e}),H(t)}).prototype,"toString",function(){return this._k}),E.f=Q,j.f=K,n(38).f=O.f=Z,n(37).f=X,P.f=tt,o&&!n(23)&&s(G,"propertyIsEnumerable",X,!0),d.f=function(t){return H(h(t))}),a(a.G+a.W+a.F*!W,{Symbol:L});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=N(h.store),it=0;rt.length>it;)v(rt[it++]);a(a.S+a.F*!W,"Symbol",{for:function(t){return i(V,t+="")?V[t]:V[t]=L(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var e in V)if(V[e]===t)return e},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!W,"Object",{create:function(t,e){return void 0===e?k(t):Y(k(t),e)},defineProperty:K,defineProperties:Y,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var ot=c(function(){P.f(1)});a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return P.f(b(t))}}),R&&a(a.S+a.F*(!W||c(function(){var t=L();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(_(e)||void 0!==t)&&!J(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!J(e))return e}),r[1]=e,M.apply(R,r)}}),L.prototype[I]||n(13)(L.prototype,I,L.prototype.valueOf),f(L,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){"use strict";var r=n(72)(!0);n(54)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(48),i=n(29);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(2);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e){t.exports=!1},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(24)("meta"),i=n(2),o=n(9),a=n(5).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(6)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!o(t,r)&&l(t),t}}},function(t,e,n){var r=n(5).f,i=n(9),o=n(1)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(66),i=n(51);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(49),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(29);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(3),i=n(90),o=n(51),a=n(50)("IE_PROTO"),s=function(){},u=function(){var t,e=n(47)("iframe"),r=o.length;for(e.style.display="none",n(68).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("