Skip to content

Commit 23a0bcb

Browse files
authored
Add gh actions (#5)
* Feat(CI): add twigcs * Add Github actions
1 parent 9817d7d commit 23a0bcb

File tree

6 files changed

+159
-3
lines changed

6 files changed

+159
-3
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Bug Report
2+
description: Create a report to help us improve advancedforms
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
8+
Dear GLPI plugin user.
9+
10+
**⚠️ Please never use standard issues to report security problems. See [security policy](https://github.com/pluginsGLPI/advancedforms/security/policy) for more details. ⚠️**
11+
12+
BEFORE SUBMITTING YOUR ISSUE, please make sure to read and follow these steps:
13+
14+
* We do not track feature requests nor enhancements here. Propose them on the [suggest dedicated site](https://suggest.glpi-project.org).
15+
* Keep this tracker in ENGLISH. If you want support in your language, the [community forum](https://forum.glpi-project.org) is the best place.
16+
* Always try to reproduce your issue at least on latest stable release.
17+
18+
The GLPI team.
19+
- type: markdown
20+
attributes:
21+
value: |
22+
## Professional Support
23+
24+
We do not guarantee any processing / resolution time for community issues.
25+
26+
If you need a quick fix or any guarantee, you should consider to buy a GLPI Network Subscription.
27+
28+
More information here: https://glpi-project.org/subscriptions/
29+
- type: checkboxes
30+
id: terms
31+
attributes:
32+
label: Code of Conduct
33+
description: By submitting this issue, you agree to follow hereinabove rules and [Contribution guide](https://github.com/glpi-project/glpi/blob/main/CONTRIBUTING.md)
34+
options:
35+
- label: I agree to follow this project's Code of Conduct
36+
validations:
37+
required: true
38+
- type: checkboxes
39+
attributes:
40+
label: Is there an existing issue for this?
41+
description: Please search to see if an issue already exists for the bug you encountered.
42+
options:
43+
- label: I have searched the existing issues
44+
validations:
45+
required: true
46+
- type: input
47+
id: glpi-version
48+
attributes:
49+
label: GLPI Version
50+
description: What version of our GLPI are you running?
51+
validations:
52+
required: true
53+
- type: input
54+
id: plugin-version
55+
attributes:
56+
label: Plugin version
57+
description: What version of `advancedforms` are you running?
58+
validations:
59+
required: true
60+
- type: textarea
61+
attributes:
62+
label: Bug description
63+
description: A concise description of the problem you are experiencing and what you expected to happen.
64+
validations:
65+
required: false
66+
- type: textarea
67+
id: logs
68+
attributes:
69+
label: Relevant log output
70+
description: |
71+
Please copy and paste any relevant log output. Find them in `*-error.log` files under `glpi/files/_log/`.
72+
73+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
74+
render: shell
75+
- type: input
76+
id: url
77+
attributes:
78+
label: Page URL
79+
description: If applicable, page URL where the bug happens.
80+
validations:
81+
required: false
82+
- type: textarea
83+
attributes:
84+
label: Steps To reproduce
85+
description: Steps to reproduce the behavior.
86+
placeholder: |
87+
1. With this config...
88+
2. Go to...
89+
3. Scroll down to...
90+
4. See error...
91+
validations:
92+
required: false
93+
- type: textarea
94+
attributes:
95+
label: Your GLPI setup information
96+
description: Please copy and paste information you will find in GLPI in `Setup > General` menu, `System` tab.
97+
validations:
98+
required: false
99+
- type: textarea
100+
attributes:
101+
label: Anything else?
102+
description: Add any other context about the problem here.
103+
validations:
104+
required: false

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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
10+
- package-ecosystem: "composer"
11+
directory: "/"
12+
schedule:
13+
interval: "monthly"
14+
allow:
15+
- dependency-type: "direct"
16+
open-pull-requests-limit: 100
17+
versioning-strategy: "increase"
18+
groups:
19+
dev-dependencies:
20+
dependency-type: "development"

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Checklist before requesting a review
2+
3+
*Please delete options that are not relevant.*
4+
5+
- [ ] I have performed a self-review of my code.
6+
- [ ] I have added tests (when available) that prove my fix is effective or that my feature works.
7+
- [ ] I have updated the CHANGELOG with a short functional description of the fix or new feature.
8+
- [ ] This change requires a documentation update.
9+
10+
## Description
11+
12+
- It fixes # (issue number, if applicable)
13+
- Here is a brief description of what this PR does
14+
15+
## Screenshots (if appropriate):

.twig_cs.dist.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use FriendsOfTwig\Twigcs\Finder\TemplateFinder;
6+
use FriendsOfTwig\Twigcs\Config\Config;
7+
use Glpi\Tools\GlpiTwigRuleset;
8+
9+
$finder = TemplateFinder::create()
10+
->in(__DIR__ . '/templates')
11+
->name('*.html.twig')
12+
->ignoreVCSIgnored(true);
13+
14+
return Config::create()
15+
->setFinder($finder)
16+
->setRuleSet(GlpiTwigRuleset::class)
17+
;

templates/configurable_item.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
unit tests so it need to call the same "source" method #}
3434
{% set slug = call('Toolbox::Slugify', [
3535
get_class(item)
36-
] ) %}
36+
]) %}
3737

3838
<div
3939
class="col-12 col-lg-6 col-xxl-4 mb-2"

templates/editor/question_types/ldap_select_config.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
'display_emptychoice': true,
4848
'full_width' : true,
4949
'disabled' : true,
50-
'init' : question is not null ? true: false,
50+
'init' : question is not null ? true : false,
5151
}
5252
) }}
5353
</div>
@@ -89,7 +89,7 @@
8989
__('Attribute'), {
9090
'full_width' : true,
9191
'is_horizontal': false,
92-
'init' : question is not null ? true: false,
92+
'init' : question is not null ? true : false,
9393
}
9494
) }}
9595
</div>

0 commit comments

Comments
 (0)