Skip to content

Commit 1989a3b

Browse files
stonebuzzcedric-anne
authored andcommitted
First version
0 parents  commit 1989a3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+6732
-0
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: "GLPI professional support"
4+
url: "https://services.glpi-network.com"
5+
about: "Get professional support from the editor and a network of local partners."
6+
- name: "Find an official partner"
7+
url: "https://glpi-project.org/partners/"
8+
about: "Get support to deploy GLPI in a professional manner."
9+
- name: "GLPI Community Forum"
10+
url: "https://forum.glpi-project.org"
11+
about: "Ask questions and get help from the community."

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
# Ensure GitHub Actions are used in their latest version
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
9+
# Strategy for composer dependencies on master branch.
10+
- package-ecosystem: "composer"
11+
directory: "/"
12+
schedule:
13+
interval: "monthly"
14+
allow:
15+
- dependency-type: "direct"
16+
open-pull-requests-limit: 100
17+
target-branch: "main"
18+
versioning-strategy: "lockfile-only"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Close issues"
2+
3+
on:
4+
issues:
5+
types: ["opened"]
6+
7+
jobs:
8+
close-issue:
9+
permissions:
10+
issues: "write"
11+
name: "Close issue"
12+
runs-on: "ubuntu-latest"
13+
steps:
14+
- uses: "actions/github-script@v6"
15+
with:
16+
script: |
17+
const issues_url = context.serverUrl + '/' + context.repo.owner + '/' + context.repo.repo + '/issues/new/choose';
18+
await github.rest.issues.createComment({
19+
issue_number: context.issue.number,
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
body: `Issues opened on this repository are not processed. Please follow links proposed in ${issues_url}.`
23+
});
24+
await github.rest.issues.lock({
25+
issue_number: context.issue.number,
26+
owner: context.repo.owner,
27+
repo: context.repo.repo,
28+
});
29+
await github.rest.issues.update({
30+
issue_number: context.issue.number,
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
state: "closed",
34+
});

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Plugin release"
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
create-release:
10+
name: "Create release"
11+
runs-on: "ubuntu-latest"
12+
steps:
13+
- name: "Extract tag name"
14+
run: |
15+
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
16+
- name: "Checkout"
17+
uses: "actions/checkout@v4"
18+
- name: "Build package"
19+
id: "build-package"
20+
uses: "glpi-project/tools/github-actions/build-package@0.6.4"
21+
with:
22+
plugin-version: ${{ env.tag_name }}
23+
- name: "Create release"
24+
id: "create-release"
25+
uses: "actions/create-release@v1"
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
with:
29+
tag_name: ${{ env.tag_name }}
30+
release_name: ${{ env.tag_name }}
31+
draft: true
32+
- name: "Attach package to release"
33+
uses: "actions/upload-release-asset@v1"
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
with:
37+
upload_url: ${{ steps.create-release.outputs.upload_url }}
38+
asset_path: ${{ steps.build-package.outputs.package-path }}
39+
asset_name: ${{ steps.build-package.outputs.package-basename }}
40+
asset_content_type: " application/x-bzip2"

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist/
2+
vendor/
3+
.gh_token
4+
*.min.*

.phpcs.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<ruleset>
3+
<file>.</file>
4+
<exclude-pattern>/.git/</exclude-pattern>
5+
<exclude-pattern type="relative">^vendor/</exclude-pattern>
6+
7+
<arg name="colors" />
8+
<arg name="extensions" value="php" />
9+
<arg value="p" />
10+
<arg name="warning-severity" value="0" />
11+
12+
<rule ref="PSR12">
13+
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
14+
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
15+
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
16+
</rule>
17+
<rule ref="Generic.Arrays.ArrayIndent"></rule>
18+
</ruleset>

.tx/config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[main]
2+
host = https://www.transifex.com
3+
4+
[o:teclib:p:glpi-plugin-databaseinventory:r:databaseinventory-pot]
5+
file_filter = locales/<lang>.po
6+
source_file = locales/databaseinventory.pot
7+
source_lang = en_GB
8+
type = PO

0 commit comments

Comments
 (0)