Skip to content

Commit

Permalink
First version
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored and cedric-anne committed Sep 26, 2023
0 parents commit 1989a3b
Show file tree
Hide file tree
Showing 51 changed files with 6,732 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: "GLPI professional support"
url: "https://services.glpi-network.com"
about: "Get professional support from the editor and a network of local partners."
- name: "Find an official partner"
url: "https://glpi-project.org/partners/"
about: "Get support to deploy GLPI in a professional manner."
- name: "GLPI Community Forum"
url: "https://forum.glpi-project.org"
about: "Ask questions and get help from the community."
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
# Ensure GitHub Actions are used in their latest version
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

# Strategy for composer dependencies on master branch.
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "monthly"
allow:
- dependency-type: "direct"
open-pull-requests-limit: 100
target-branch: "main"
versioning-strategy: "lockfile-only"
34 changes: 34 additions & 0 deletions .github/workflows/autoclose-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Close issues"

on:
issues:
types: ["opened"]

jobs:
close-issue:
permissions:
issues: "write"
name: "Close issue"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/github-script@v6"
with:
script: |
const issues_url = context.serverUrl + '/' + context.repo.owner + '/' + context.repo.repo + '/issues/new/choose';
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Issues opened on this repository are not processed. Please follow links proposed in ${issues_url}.`
});
await github.rest.issues.lock({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});
await github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: "closed",
});
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Plugin release"

on:
push:
tags:
- '*'

jobs:
create-release:
name: "Create release"
runs-on: "ubuntu-latest"
steps:
- name: "Extract tag name"
run: |
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Build package"
id: "build-package"
uses: "glpi-project/tools/github-actions/[email protected]"
with:
plugin-version: ${{ env.tag_name }}
- name: "Create release"
id: "create-release"
uses: "actions/create-release@v1"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.tag_name }}
release_name: ${{ env.tag_name }}
draft: true
- name: "Attach package to release"
uses: "actions/upload-release-asset@v1"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ${{ steps.build-package.outputs.package-path }}
asset_name: ${{ steps.build-package.outputs.package-basename }}
asset_content_type: " application/x-bzip2"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
vendor/
.gh_token
*.min.*
18 changes: 18 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<ruleset>
<file>.</file>
<exclude-pattern>/.git/</exclude-pattern>
<exclude-pattern type="relative">^vendor/</exclude-pattern>

<arg name="colors" />
<arg name="extensions" value="php" />
<arg value="p" />
<arg name="warning-severity" value="0" />

<rule ref="PSR12">
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
</rule>
<rule ref="Generic.Arrays.ArrayIndent"></rule>
</ruleset>
8 changes: 8 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[main]
host = https://www.transifex.com

[o:teclib:p:glpi-plugin-databaseinventory:r:databaseinventory-pot]
file_filter = locales/<lang>.po
source_file = locales/databaseinventory.pot
source_lang = en_GB
type = PO
Loading

0 comments on commit 1989a3b

Please sign in to comment.