Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 2e02943

Browse files
committed
chore: use conventional commits
1 parent 78f5b33 commit 2e02943

30 files changed

+263
-312
lines changed

.eslintrc.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/build_and_check.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
php-version: [7.4, 8.0]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Cache Composer dependencies
23+
uses: actions/cache@v2
24+
with:
25+
path: /tmp/composer-cache
26+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
27+
- name: Install dependencies
28+
uses: php-actions/composer@v5
29+
with:
30+
php_version: ${{ matrix.php-version }}
31+
version: 2
32+
php_extensions: json
33+
- name: Run easy coding standard
34+
run: vendor/bin/ecs check
35+
release:
36+
name: Release
37+
needs: [build]
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v2
42+
with:
43+
fetch-depth: 0
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v1
46+
with:
47+
node-version: 14
48+
- name: Release
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
run: npm install && npx semantic-release

.releaserc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"branches": ["master"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
"@semantic-release/github",
8+
["@semantic-release/git", {
9+
"assets": ["CHANGELOG.md"],
10+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
11+
}]
12+
]
13+
}

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## [Unreleased]
5-
64
## [v4.3.0]
75
#### Added
86
- Add statistics view for 3 months

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Each line is a file pattern followed by one or more owners.
33

44
# These owners will be the default owners for everything in the repo.
5-
* @pajavyskocil @dBucik
5+
* @vyskocilpavel @dBucik
66

77
# Order is important. The last matching pattern has the most precedence.
88
# So if a pull request only touches javascript files, only these owners

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
# proxystatistics-simplesamlphp-module
22
[![Latest Stable Version](https://poser.pugx.org/cesnet/simplesamlphp-module-proxystatistics/v/stable)](https://packagist.org/packages/cesnet/simplesamlphp-module-proxystatistics)
33
[![Total Downloads](https://poser.pugx.org/cesnet/simplesamlphp-module-proxystatistics/downloads)](https://packagist.org/packages/cesnet/simplesamlphp-module-proxystatistics)
4-
[![CodeFactor](https://www.codefactor.io/repository/github/cesnet/proxystatistics-simplesamlphp-module/badge)](https://www.codefactor.io/repository/github/cesnet/proxystatistics-simplesamlphp-module)
4+
[![CI](https://github.com/CESNET/proxystatistics-simplesamlphp-module/actions/workflows/build_and_check.yml/badge.svg)](https://github.com/CESNET/proxystatistics-simplesamlphp-module/actions/workflows/build_and_check.yml)
55
[![License](https://poser.pugx.org/cesnet/simplesamlphp-module-proxystatistics/license)](https://packagist.org/packages/cesnet/simplesamlphp-module-proxystatistics)
66

77
Module for simpleSAMLphp which shows Proxy IdP/SP statistics
88

9+
## Contribution
10+
11+
This repository uses [Conventional Commits](https://www.npmjs.com/package/@commitlint/config-conventional).
12+
13+
Any change that significantly changes behavior in a backward-incompatible way or requires a configuration change must be marked as BREAKING CHANGE.
14+
15+
### Available scopes:
16+
* design
17+
* Auth Process filters:
18+
* statistics
19+
* ...
20+
21+
922
## Instalation
1023
Once you have installed SimpleSAMLphp, installing this module is very simple. First of all, you will need to download Composer if you haven't already. After installing Composer, just execute the following command in the root of your SimpleSAMLphp installation:
1124

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
},
2626
"require-dev": {
2727
"squizlabs/php_codesniffer": "*",
28-
"symplify/easy-coding-standard": "^7.2"
28+
"symplify/easy-coding-standard": "^9.2"
2929
}
3030
}

config-templates/module_proxystatistics.php

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/**
4-
* This is an example configuration of SimpleSAMLphp Perun interface and additional features.
5-
* Copy this file to default config directory and edit the properties.
6+
* This is an example configuration of SimpleSAMLphp Perun interface and additional features. Copy this file to default
7+
* config directory and edit the properties.
68
*
79
* @author Pavel Vyskočil <vyskocilpavel@muni.cz>
810
* @author Pavel Břoušek <brousek@ics.muni.cz>
911
*/
1012

1113
$config = [
12-
1314
/*
1415
* Choose one of the following modes: PROXY, IDP, SP, MULTI_IDP
1516
* PROXY - collects data about number of logins from each identity provider and accessed services
@@ -47,10 +48,9 @@
4748
'database.username' => 'stats',
4849
'database.password' => 'stats',
4950

50-
/**
51-
* Configuration for SSL
52-
* If you want to use SSL, fill these values and uncomment the block of code
53-
*/
51+
/**
52+
* Configuration for SSL If you want to use SSL, fill these values and uncomment the block of code
53+
*/
5454
//'database.driver_options' => [
5555
// PDO::MYSQL_ATTR_SSL_KEY => '', // Path for the ssl key file
5656
// PDO::MYSQL_ATTR_SSL_CERT => '', // Path for the ssl cert file
@@ -61,13 +61,13 @@
6161

6262
/**
6363
* Which attribute should be used as user ID.
64+
*
6465
* @default uid
6566
*/
6667
//'userIdAttribute' => 'uid',
6768

6869
/**
69-
* Database table names.
70-
* Default is to keep the name (as in `tables.sql`)
70+
* Database table names. Default is to keep the name (as in `tables.sql`)
7171
*/
7272
'tableNames' => [
7373
//'statistics_sums' => 'statistics_sums',
@@ -76,14 +76,13 @@
7676
//'statistics_sp' => 'statistics_sp',
7777
],
7878

79-
/**
80-
* Authentication source name if authentication should be required.
81-
* Defaults to empty string.
82-
*/
79+
/**
80+
* Authentication source name if authentication should be required. Defaults to empty string.
81+
*/
8382
//'requireAuth.source' => 'default-sp',
8483

85-
/**
86-
* For how many days should the detailed statistics be kept. Minimum is 31.
87-
*/
84+
/**
85+
* For how many days should the detailed statistics be kept. Minimum is 31.
86+
*/
8887
//'keepPerUser' => 62,
8988
];

ecs.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
6+
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
7+
use Symplify\EasyCodingStandard\ValueObject\Option;
8+
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
9+
10+
return static function (ContainerConfigurator $containerConfigurator): void {
11+
$services = $containerConfigurator->services();
12+
$services->set(ArraySyntaxFixer::class)
13+
->call('configure', [[
14+
'syntax' => 'short',
15+
]])
16+
;
17+
18+
$parameters = $containerConfigurator->parameters();
19+
$parameters->set(Option::PATHS, [
20+
__DIR__ . '/ecs.php',
21+
__DIR__ . '/config-templates',
22+
__DIR__ . '/dictionaries',
23+
__DIR__ . '/hooks',
24+
__DIR__ . '/lib',
25+
__DIR__ . '/scripts',
26+
__DIR__ . '/templates',
27+
__DIR__ . '/www',
28+
__DIR__ . '/composer.json',
29+
]);
30+
31+
$containerConfigurator->import(SetList::CLEAN_CODE);
32+
$containerConfigurator->import(SetList::SYMPLIFY);
33+
$containerConfigurator->import(SetList::ARRAY);
34+
$containerConfigurator->import(SetList::COMMON);
35+
$containerConfigurator->import(SetList::COMMENTS);
36+
$containerConfigurator->import(SetList::CONTROL_STRUCTURES);
37+
$containerConfigurator->import(SetList::DOCBLOCK);
38+
$containerConfigurator->import(SetList::NAMESPACES);
39+
$containerConfigurator->import(SetList::PHPUNIT);
40+
$containerConfigurator->import(SetList::SPACES);
41+
$containerConfigurator->import(SetList::PSR_12);
42+
};

ecs.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)