Skip to content

Commit a874f91

Browse files
jorgepilotopyansys-ci-botRobPasMue
authored
ci: update labeling strategy (#558)
Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Roberto Pastor Muela <[email protected]>
1 parent a549eec commit a874f91

File tree

5 files changed

+219
-134
lines changed

5 files changed

+219
-134
lines changed

.github/labeler.yml

Lines changed: 73 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,73 @@
1-
documentation:
2-
- changed-files:
3-
- any-glob-to-any-file: ['doc/source/**/*']
4-
maintenance:
5-
- changed-files:
6-
- any-glob-to-any-file: ['.github/**/*', '.flake8', 'pyproject.toml']
7-
dependencies:
8-
- changed-files:
9-
- any-glob-to-any-file: ['pyproject.toml']
1+
# -- Labels based on PR title ------------------------------------------------
2+
3+
'fix':
4+
- head-branch: ['fix']
5+
6+
'enhancement':
7+
- head-branch: ['feat']
8+
9+
# -- Documentation labels ----------------------------------------------------
10+
11+
'documentation':
12+
- all:
13+
- changed-files:
14+
- any-glob-to-any-file: ['doc/source/**/*.rst', 'README.rst']
15+
16+
# -- HTML, CSS, JS, and web development labels -------------------------------
17+
18+
'ui/ux':
19+
- all:
20+
- changed-files:
21+
- any-glob-to-any-file: ['src/ansys_sphinx_theme/theme/ansys_sphinx_theme/**/*.html']
22+
23+
'css':
24+
- all:
25+
- changed-files:
26+
- any-glob-to-any-file: ['src/ansys_sphinx_theme/theme/ansys_sphinx_theme/**/*.css']
27+
28+
'js':
29+
- all:
30+
- changed-files:
31+
- any-glob-to-any-file: ['src/ansys_sphinx_theme/theme/ansys_sphinx_theme/**/*.js']
32+
33+
# -- Other labels ------------------------------------------------------------
34+
35+
'maintenance':
36+
- any:
37+
- changed-files:
38+
- any-glob-to-any-file: ['.pre-commit-config.yaml', 'doc/.vale.ini']
39+
40+
'ci':
41+
- any:
42+
- changed-files:
43+
- any-glob-to-any-file: ['.github/workflows/**']
44+
45+
# HACK: the following labels are declared with the only purpose of avoiding the
46+
# GitHub labeler bot to remove those. This is a known issue reported in the
47+
# official action/labeler repo https://github.com/actions/labeler/issues/763
48+
49+
'ci:skip':
50+
- all:
51+
- changed-files:
52+
- all-globs-to-all-files: ['THIS-NEVER-MATCHES-A-FILE']
53+
54+
'docs:skip':
55+
- all:
56+
- changed-files:
57+
- all-globs-to-all-files: ['THIS-NEVER-MATCHES-A-FILE']
58+
59+
'tests:skip':
60+
- all:
61+
- changed-files:
62+
- all-globs-to-all-files: ['THIS-NEVER-MATCHES-A-FILE']
63+
64+
'hacktoberfest':
65+
- all:
66+
- changed-files:
67+
- all-globs-to-all-files: ['THIS-NEVER-MATCHES-A-FILE']
68+
69+
'hacktoberfest-accepted':
70+
- all:
71+
- changed-files:
72+
- all-globs-to-all-files: ['THIS-NEVER-MATCHES-A-FILE']
73+

.github/labels.yml

Lines changed: 111 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,91 @@
1-
- name: bug
2-
description: Something isn't working
1+
# The labels declared in this file are the ones avialables
2+
# https://github.com/ansys/ansys-sphinx-theme/labels
3+
4+
# -- Defects and glitches labels----------------------------------------------
5+
6+
- name: 'bug'
7+
description: Defects or glitches reported by users or developers
38
color: d42a34
49

5-
- name: dependencies
6-
description: Related with project dependencies
7-
color: ffc0cb
10+
- name: 'fix'
11+
description: Pull requests related to resolving problems or errors
12+
color: d42a34
13+
14+
# -- Style labels ------------------------------------------------------------
15+
16+
- name: 'style'
17+
description: Improvements related to general project style
18+
color: dcbeff
19+
20+
- name: 'style:code'
21+
description: Improvements related to code style
22+
color: dcbeff
23+
24+
- name: 'style:docs'
25+
description: Improvements related to doc style
26+
color: dcbeff
27+
28+
- name: 'style:branch-name'
29+
description: Verifies branch name is compliant with PyAnsys guidelines
30+
color: dcbeff
31+
32+
- name: 'style:skip'
33+
description: Skip style runs in CI/CD
34+
color: dcbeff
35+
36+
# -- Tests labels ------------------------------------------------------------
37+
38+
- name: 'tests'
39+
description: Related with improvements of the test suite
40+
color: ffd8b1
41+
42+
- name: 'tests:skip'
43+
description: Skip tests runs in CI/CD
44+
color: ffd8b1
45+
46+
# -- Documentation labels ----------------------------------------------------
847

9-
- name: documentation
10-
description: Improvements or additions to documentation
48+
- name: 'docs'
49+
description: Issues related to documentation
1150
color: 0677ba
1251

13-
- name: enhancement
14-
description: New features or code improvements
15-
color: FFD827
52+
- name: 'docs:api'
53+
description: Related to API documentation
54+
color: 0677ba
1655

17-
- name: good first issue
18-
description: Easy to solve for newcomers
19-
color: 62ca50
56+
- name: 'docs:examples'
57+
description: Related to documentation examples
58+
color: 0677ba
2059

21-
- name: maintenance
22-
description: Package and maintenance related
23-
color: f78c37
60+
- name: 'docs:skip'
61+
description: Skip documentation runs in CI/CD
62+
color: 0677ba
2463

25-
- name: release
26-
description: Anything related to an incoming release
27-
color: ffffff
64+
# -- Dependencies labels -----------------------------------------------------
2865

29-
- name: hacktoberfest
30-
description: Hacktoberfest related
31-
color: 62ca50
66+
- name: 'dependencies'
67+
description: Related with project dependencies
68+
color: fabed4
3269

33-
- name: hacktoberfest-accepted
34-
description: Hacktoberfest accepted contribution
35-
color: 62ca50
70+
- name: 'dependencies:pyproject'
71+
description: Related with project file dependencies
72+
color: fabed4
73+
74+
- name: 'dependencies:ci'
75+
description: Related with pipelines dependencies
76+
color: fabed4
77+
78+
# -- CI/CD labels ------------------------------------------------------------
79+
80+
- name: 'ci'
81+
description: Pipelines maintenance related
82+
color: a9a9a9
83+
84+
- name: 'ci:skip'
85+
description: Skip CI/CD runs
86+
color: a9a9a9
87+
88+
# -- HTML, CSS, JS, and web development labels -------------------------------
3689

3790
- name: css
3891
description: Requires or modifies cascading style sheets
@@ -45,3 +98,36 @@
4598
- name: ui/ux
4699
description: Related with UI/UX design
47100
color: ffffff
101+
102+
# -- Hacktoberfest labels ----------------------------------------------------
103+
104+
- name: hacktoberfest
105+
description: Hacktoberfest related
106+
color: 62ca50
107+
108+
- name: hacktoberfest-accepted
109+
description: Hacktoberfest accepted contribution
110+
color: 62ca50
111+
112+
# -- Other labels ------------------------------------------------------------
113+
114+
- name: 'release'
115+
description: Anything related to an incoming release
116+
color: ffffff
117+
118+
- name: 'good first issue'
119+
description: Issues suitable for newcomers or those with less experience
120+
color: 62ca50
121+
122+
- name: 'enhancement'
123+
description: General improvements to existing features
124+
color: ffd827
125+
126+
- name: 'maintenance'
127+
description: Generic maintenance related
128+
color: f78c37
129+
130+
- name: 'docker'
131+
description: Docker maintenance related
132+
color: 000075
133+

.github/workflows/ci_cd.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,42 @@ concurrency:
1919

2020
jobs:
2121

22+
labeler:
23+
name: "Labels"
24+
permissions:
25+
contents: read
26+
pull-requests: write
27+
runs-on: ubuntu-latest
28+
steps:
29+
30+
- uses: actions/checkout@v4
31+
- uses: micnncim/action-label-syncer@v1
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: "Label pull-request"
36+
uses: actions/[email protected]
37+
with:
38+
repo-token: ${{ secrets.GITHUB_TOKEN }}
39+
40+
changelog-fragment:
41+
name: "Create changelog fragment"
42+
needs: "labeler"
43+
permissions:
44+
contents: write
45+
pull-requests: write
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: ansys/actions/doc-changelog@v8
49+
with:
50+
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
51+
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
52+
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
53+
2254
code-style:
2355
name: Code style
2456
runs-on: ubuntu-latest
57+
needs: "changelog-fragment"
2558
steps:
2659
- name: "Run Ansys code style checks"
2760
uses: ansys/actions/code-style@v8
@@ -31,6 +64,7 @@ jobs:
3164
doc-style:
3265
name: Doc style
3366
runs-on: ubuntu-latest
67+
needs: "changelog-fragment"
3468
steps:
3569
- name: "Run Ansys documentation style checks"
3670
uses: ansys/actions/doc-style@v8

.github/workflows/label.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

doc/changelog.d/558.maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ci: update labeling strategy

0 commit comments

Comments
 (0)