Skip to content

Commit

Permalink
Merge cda3d50 into 78f580b
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Aug 2, 2017
2 parents 78f580b + cda3d50 commit 0feeecb
Show file tree
Hide file tree
Showing 46 changed files with 5,595 additions and 1,081 deletions.
5 changes: 1 addition & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"presets": [
"es2015",
"react"
]
"presets": ["@mozaik/babel-preset"]
}
63 changes: 0 additions & 63 deletions .eslintrc

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
parser: babel-eslint
parserOptions:
ecmaVersion: 6
sourceType: module
ecmaFeatures:
jsx: true
env:
browser: true
node: true
es6: true
extends:
- eslint:recommended
- plugin:react/recommended
File renamed without changes.
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.DS_Store
node_modules
npm-debug.log*
.nyc_output
coverage
.idea
*.log*
/.nyc_output
/coverage
/lib
/es
/node_modules
34 changes: 27 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
test
preview
# Doc
/preview

# config
.babelrc
.eslintrc.yml
.gitignore
.npmignore
.travis.yml
.eslintrc
npm-debug.log*
.nyc_output
coverage

# Logs
*.log*

# Non transpiled source code
/src

# Tests
/test
/.nyc_output
/coverage

# GitHub
/.github

# OSX
.DS_Store
ISSUE_TEMPLATE.md

# IDE
.idea
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
language: node_js
node_js:
- '0.12'
- '4'
- '5'
before_install:
- npm install -g npm
- '6'
- '7'
- '8'
script:
- npm run eslint
- npm run test-cover
- yarn run lint
- yarn run fmt:check
- yarn run test:cover
after_success:
- npm run coveralls
- yarn run coverage
145 changes: 81 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

[![Deploy][heroku-image]][heroku-url]

> This branch contains code for the version compatible with
> Mozaïk v2, if you're looking for v1, please use
> [mozaik-1 branch](https://github.com/plouc/mozaik-ext-gitlab/tree/mozaik-1).
This repository contains some widgets to use with [Mozaïk](https://github.com/plouc/mozaik).

## Demo
Expand All @@ -22,9 +26,9 @@ You can see a live demo of the widgets [here](http://mozaik-gitlab.herokuapp.com
- [Build History](#gitlab-build-history)
- [Project Members](#gitlab-project-members)
- [Project Contributors](#gitlab-project-contributors)
- [Merge Requests Gauge](#gitlab-merge-requests-gauge)
- [Project](#gitlab-project)


### GitLab Branches

> Show GitLab project branches.
Expand All @@ -39,12 +43,18 @@ key | required | description

#### usage

```javascript
{
type: 'gitlab.branches',
project: 'gitlab-org/gitlab-ce',
columns: 1, rows: 1, x: 0, y: 0
}
``` yaml
# config.yml
dashboards:
- #
widgets:
- extension: gitlab
widget: Branches
project: gitlab-org/gitlab-ce
columns: 1
rows: 1
x: 0
y: 0
```


Expand All @@ -62,12 +72,18 @@ key | required | description

#### usage

```javascript
{
type: 'gitlab.build_histogram',
project: 'gitlab-org/gitlab-ce',
columns: 1, rows: 1, x: 0, y: 0
}
``` yaml
# config.yml
dashboards:
- #
widgets:
- extension: gitlab
widget: BuildHistogram
project: gitlab-org/gitlab-ce
columns: 2
rows: 1
x: 0
y: 0
```


Expand All @@ -85,12 +101,18 @@ key | required | description

#### usage

```javascript
{
type: 'gitlab.build_history',
project: 'gitlab-org/gitlab-ce',
columns: 1, rows: 1, x: 0, y: 0
}
``` yaml
# config.yml
dashboards:
- #
widgets:
- extension: gitlab
widget: BuildHistory
project: gitlab-org/gitlab-ce
columns: 1
rows: 1
x: 0
y: 0
```


Expand All @@ -108,12 +130,18 @@ key | required | description

#### usage

```javascript
{
type: 'gitlab.project_members',
project: 'gitlab-org/gitlab-ce',
columns: 1, rows: 1, x: 0, y: 0
}
``` yaml
# config.yml
dashboards:
- #
widgets:
- extension: gitlab
widget: ProjectMembers
project: gitlab-org/gitlab-ce
columns: 1
rows: 1
x: 0
y: 0
```


Expand All @@ -131,41 +159,24 @@ key | required | description

#### usage

```javascript
{
type: 'gitlab.project_contributors',
project: 'gitlab-org/gitlab-ce',
columns: 1, rows: 1, x: 0, y: 0
}
```


### GitLab Merge Requests Gauge

> Show GitLab project merge requests gauge.
![Gitlab project merge requests gauge](https://raw.githubusercontent.com/plouc/mozaik-ext-gitlab/master/preview/gitlab_merge_requests_gauge.png)

#### parameters

key | required | description
----------|----------|--------------------------
`project` | yes | *ID or NAMESPACE/PROJECT_NAME of a project*

#### usage

```javascript
{
type: 'gitlab.merge_requests_gauge',
project: 'gitlab-org/gitlab-ce',
columns: 1, rows: 1, x: 0, y: 0
}
``` yaml
# config.yml
dashboards:
- #
widgets:
- extension: gitlab
widget: ProjectContributors
project: gitlab-org/gitlab-ce
columns: 1
rows: 1
x: 0
y: 0
```


### GitLab Project

> Show GitLab project merge requests gauge.
> Show GitLab project info.
![Gitlab project](https://raw.githubusercontent.com/plouc/mozaik-ext-gitlab/master/preview/gitlab_project.png)

Expand All @@ -177,25 +188,31 @@ key | required | description

#### usage

```javascript
{
type: 'gitlab.project',
project: 'gitlab-org/gitlab-ce',
columns: 1, rows: 1, x: 0, y: 0
}
``` yaml
# config.yml
dashboards:
- #
widgets:
- extension: gitlab
widget: Project
project: gitlab-org/gitlab-ce
columns: 1
rows: 1
x: 0
y: 0
```


[license-image]: https://img.shields.io/github/license/plouc/mozaik-ext-gitlab.svg?style=flat-square
[license-url]: https://github.com/plouc/mozaik-ext-gitlab/blob/master/LICENSE.md
[travis-image]: https://img.shields.io/travis/plouc/mozaik-ext-gitlab.svg?style=flat-square
[travis-url]: https://travis-ci.org/plouc/mozaik-ext-gitlab
[npm-image]: https://img.shields.io/npm/v/mozaik-ext-gitlab.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/mozaik-ext-gitlab
[npm-image]: https://img.shields.io/npm/v/@mozaik/ext-gitlab.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@mozaik/ext-gitlab
[gemnasium-image]: https://img.shields.io/gemnasium/plouc/mozaik-ext-gitlab.svg?style=flat-square
[gemnasium-url]: https://gemnasium.com/plouc/mozaik-ext-gitlab
[coverage-image]: https://img.shields.io/coveralls/plouc/mozaik-ext-gitlab.svg?style=flat-square
[coverage-url]: https://coveralls.io/github/plouc/mozaik-ext-gitlab
[widget-count-image]: https://img.shields.io/badge/widgets-x7-green.svg?style=flat-square
[widget-count-image]: https://img.shields.io/badge/widgets-x6-green.svg?style=flat-square
[heroku-image]: https://www.herokucdn.com/deploy/button.svg
[heroku-url]: https://heroku.com/deploy?template=https://github.com/plouc/mozaik-ext-gitlab/tree/demo
2 changes: 1 addition & 1 deletion client.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./src/client');
module.exports = require('./lib/client')
Loading

0 comments on commit 0feeecb

Please sign in to comment.