move CI to Forgejo (n/playbooks#227) #10
4 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
name: lint
|
name: lint
|
||||||
run-name: lint is launched by ${{ github.actor }}
|
run-name: lint is launched by ${{ github.actor }}
|
||||||
on: [push]
|
on: [push]
|
||||||
|
@ -7,12 +8,12 @@ jobs:
|
||||||
name: lint
|
name: lint
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Forgejo!"
|
||||||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Install linters using Composer
|
- name: Install linters using Composer
|
||||||
run: |
|
run: |
|
||||||
export COMPOSER_HOME=/tmp
|
export COMPOSER_HOME=/tmp
|
||||||
echo "{}" > composer.json
|
echo "{}" > composer.json
|
||||||
composer config --no-interaction allow-plugins.bamarni/composer-bin-plugin true
|
composer config --no-interaction allow-plugins.bamarni/composer-bin-plugin true
|
||||||
|
@ -24,4 +25,3 @@ jobs:
|
||||||
- name: PHP CS Fixer
|
- name: PHP CS Fixer
|
||||||
run: vendor/bin/php-cs-fixer fix --dry-run --verbose --diff .
|
run: vendor/bin/php-cs-fixer fix --dry-run --verbose --diff .
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
|
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
vendor/
|
||||||
|
composer.*
|
5
.php-cs-fixer.php
Normal file
5
.php-cs-fixer.php
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return (new PhpCsFixer\Config())
|
||||||
|
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
|
||||||
|
;
|
|
@ -18,7 +18,7 @@ function hook_clickat_render_linklist($data)
|
||||||
);
|
);
|
||||||
foreach ($data['links'] as &$value) {
|
foreach ($data['links'] as &$value) {
|
||||||
if (strpos($value['description'], '@') !== false) {
|
if (strpos($value['description'], '@') !== false) {
|
||||||
foreach($patterns as $nic => $link) {
|
foreach ($patterns as $nic => $link) {
|
||||||
$value['description'] = preg_replace($nic, $link, $value['description']);
|
$value['description'] = preg_replace($nic, $link, $value['description']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue