You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e3d5fdc
Browse filesBrowse the repository at this point in the historyBrowse files
Fix: sync issue triage labels, skip unchanged labels and add CI (#8)
## Checklist before requesting a review
- [x] I have performed a self-review of my code.
## Description
- It fixes #N/A
- `label-commenter-config.yml` acts on the `invalid`, `support` and
`feature suggestion` labels, but nothing created them, so labelling an
issue in a repository lacking them was impossible.
- `sync/labels.json` now defines them: `invalid` keeps the GitHub
default, `support` and `feature suggestion` use the colors of
pluginsGLPI/fields.
- The label comparison always failed because `gh --jq` sorts keys and
returns a null empty description, so every run updated every label of
every repository; both sides are now normalized and unchanged labels are
skipped.
- A new `ci.yml` workflow lints every workflow (including the synced
ones) with actionlint, `sync.sh` with shellcheck and validates
`sync/*.json`; on pull requests it also runs `sync.sh` in dry run with a
read-only app token, so the changes it would apply to every synced
repository are visible before merge.
Copy file name to clipboardExpand all lines: .github/scripts/sync.sh
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,14 @@ while read -r repo; do
54
54
repo_dir="$work_dir/$name"
55
55
56
56
repo_json="$(gh api "repos/$repo")"
57
+
# Merge settings are hidden from tokens without contents write, such as the read-only pull request dry run token: settings missing from the response count as applied
58
+
if [[ "$dry_run"=="true"&&"$(jq '.allow_merge_commit == null'<<<"$repo_json")"=="true" ]];then
59
+
if [[ -z"${hidden_settings_reported:-}" ]];then
60
+
echo"merge settings not visible with a read-only token, skipped"
# Label names are case insensitive, extra labels of the repository are kept; keys are sorted and a null description is empty so unchanged labels compare equal
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ Default community health files (issue and pull request templates, security polic
7
7
Files in `sync/files/` are pushed through a pull request to every non archived repository of the organization tagged with the `sync-org-files` topic; paths listed in `sync/delete.txt` are removed from them.
8
8
Files in `sync/files-public/` are pushed the same way to public repositories only, and removed from private ones.
9
9
After each successful run of the automatic tag workflow, the synced `open-xml-update-pr.yml` workflow opens a pull request copying the `<version>` block of the matching tag's plugin XML (`plugin.xml` or `<plugin_key>.xml`) to the default branch, with the `GLPI_PROJECT_BOT` GitHub App, which needs the pull requests write permission.
10
+
Issues labelled `need feedback` are closed by the stale workflow after 44 days without activity; the synced `need-feedback.yml` workflow removes the label when the issue author comments.
10
11
Repository settings in `sync/settings.json` (any field of the [update a repository](https://docs.github.com/rest/repos/repos#update-a-repository) API) are applied directly to the same repositories, along with release immutability, Dependabot alerts and security updates, and private vulnerability reporting, secret scanning and push protection (public repositories only).
11
12
The protection of the default branch and of `X.Y/bugfixes` branches is aligned on `sync/branch-protection.json` (body of the [update branch protection](https://docs.github.com/rest/branches/branch-protection#update-branch-protection) API).
12
13
Labels in `sync/labels.json` (`name`, `color` and `description`) are created, or updated when their color or description differs; other labels of the repositories are kept.
Copy file name to clipboardExpand all lines: sync/files-public/.github/label-commenter-config.yml
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,30 @@ labels:
12
12
This issue has been closed as we only track bugs here.
13
13
14
14
You can get community support on [forums](https://forum.glpi-project.org/) or you can consider [taking a subscription](https://glpi-project.org/subscriptions/) to get professional support.
15
-
You can also [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly.
15
+
You can also [contact GLPI editor team](https://glpi-project.org/contact_us/) directly.
16
16
action: "close"
17
17
- name: "feature suggestion"
18
18
labeled:
19
19
issue:
20
20
body: |
21
21
This issue has been closed as we only track bugs here.
22
22
23
-
You can open a topic to discuss with community about this enhancement on [suggestion website](https://glpi.userecho.com/).
24
-
You can also [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly if you are willing to sponsor this feature.
23
+
You can open a topic to discuss with community about this enhancement on [suggestion website](https://suggest.glpi-project.org).
24
+
You can also [contact GLPI editor team](https://glpi-project.org/contact_us/) directly if you are willing to sponsor this feature.
25
+
action: "close"
26
+
- name: "not reproducible"
27
+
labeled:
28
+
issue:
29
+
body: |
30
+
This issue has been closed because we could not reproduce it on the latest release.
31
+
32
+
Feel free to reopen it with the exact steps to reproduce it on the latest release.
33
+
action: "close"
34
+
- name: "security report"
35
+
labeled:
36
+
issue:
37
+
body: |
38
+
This issue has been closed because security problems must not be reported publicly.
39
+
40
+
Please edit it to remove the vulnerability details, then report it privately as described in our [security policy](https://github.com/pluginsGLPI/.github/blob/main/SECURITY.md).
There has been no activity on this issue for 60 days and therefore it is considered stale
@@ -28,9 +28,25 @@ jobs:
28
28
days-before-issue-stale: 60
29
29
days-before-pr-stale: 90
30
30
days-before-close: 14
31
-
exempt-issue-labels: "bug,enhancement,question,security"# Issues with "bug", "enhancement", "question" or "security" labels will not be marked as stale
31
+
exempt-issue-labels: "bug,enhancement,question,security,need feedback"# Issues with "bug", "enhancement", "question" or "security" labels will not be marked as stale, "need feedback" ones are handled by the next step
32
32
exempt-pr-labels: "security"# PR with "security" label will not be marked as stale
33
33
exempt-draft-pr: true # Draft PR are work in progress.
34
34
exempt-all-milestones: true # Do not check issues/PR with defined milestone.
35
35
ascending: true # First check older issues/PR.
36
36
operations-per-run: 750# Max API calls per run.
37
+
# Shares the "_state" cache of the step above, harmless as long as each run processes every issue
0 commit comments