Skip to content

Commit dc1cdc7

Browse files
committed
fixed automations
1 parent 68693ac commit dc1cdc7

7 files changed

Lines changed: 83 additions & 125 deletions

File tree

.github/labeler.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ documentation:
88
- changed-files:
99
- any-glob-to-any-file:
1010
- "README.md"
11-
- "docs/**"
1211
- "CONTRIBUTING.md"
12+
- "CODE_OF_CONDUCT.md"
13+
- "docs/**"
1314

1415
data:
1516
- changed-files:
@@ -20,3 +21,19 @@ type:testing:
2021
- changed-files:
2122
- any-glob-to-any-file:
2223
- "tests/**"
24+
25+
type:accessibility:
26+
- changed-files:
27+
- any-glob-to-any-file:
28+
- "templates/**"
29+
- "static/**"
30+
31+
type:performance:
32+
- changed-files:
33+
- any-glob-to-any-file:
34+
- "utils/**"
35+
36+
type:security:
37+
- changed-files:
38+
- any-glob-to-any-file:
39+
- "utils/**"
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
name: Label PRs Based on Files
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened]
4+
pull_request_target:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
69

710
permissions:
811
contents: read
912
pull-requests: write
13+
issues: write
1014

1115
jobs:
1216
labeler:
1317
runs-on: ubuntu-latest
1418

1519
steps:
16-
- uses: actions/checkout@v4
17-
18-
- name: Label PRs
20+
- name: Label PRs automatically
1921
uses: actions/labeler@v5
22+
2023
with:
2124
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/auto-label-gssoc.yml

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

.github/workflows/auto-label-issues.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Auto Label Issues
22

33
on:
44
issues:
5-
types: [opened]
5+
types:
6+
- opened
67

78
permissions:
89
issues: write
@@ -12,8 +13,9 @@ jobs:
1213
runs-on: ubuntu-latest
1314

1415
steps:
15-
- name: Add default issue labels
16+
- name: Add default labels to new issue
1617
uses: actions/github-script@v7
18+
1719
with:
1820
script: |
1921
await github.rest.issues.addLabels({

.github/workflows/auto-label-prs.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- name: Apply labels to PR
19+
- name: Apply PR labels
2020
uses: actions/github-script@v7
2121

2222
with:
@@ -26,10 +26,24 @@ jobs:
2626
2727
let labels = ['gssoc-2026'];
2828
29-
if (branch.includes('docs/')) {
30-
labels.push('documentation');
29+
// Difficulty labels
30+
if (branch.startsWith('level1/')) {
31+
labels.push('level:beginner');
32+
}
33+
34+
if (branch.startsWith('level2/')) {
35+
labels.push('level:intermediate');
36+
}
37+
38+
if (branch.startsWith('level3/')) {
39+
labels.push('level:advanced');
40+
}
41+
42+
if (branch.startsWith('level4/')) {
43+
labels.push('level:critical');
3144
}
3245
46+
// Type labels
3347
if (branch.includes('feat/')) {
3448
labels.push('type:feature');
3549
}
@@ -38,9 +52,25 @@ jobs:
3852
labels.push('type:bug');
3953
}
4054
55+
if (branch.includes('docs/')) {
56+
labels.push('type:docs');
57+
}
58+
59+
if (branch.includes('refactor/')) {
60+
labels.push('type:refactor');
61+
}
62+
63+
if (branch.includes('test/')) {
64+
labels.push('type:testing');
65+
}
66+
67+
if (branch.includes('style/')) {
68+
labels.push('type:design');
69+
}
70+
4171
await github.rest.issues.addLabels({
4272
owner: context.repo.owner,
4373
repo: context.repo.repo,
4474
issue_number: pr.number,
4575
labels
46-
});
76+
});

.github/workflows/greetings.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# .github/workflows/greetings.yml
2-
31
name: Greetings
42

53
on:
64
issues:
7-
types: [opened]
5+
types:
6+
- opened
87

98
pull_request_target:
10-
types: [opened]
9+
types:
10+
- opened
11+
12+
permissions:
13+
issues: write
14+
pull-requests: write
1115

1216
jobs:
1317
greeting:
1418
runs-on: ubuntu-latest
1519

16-
permissions:
17-
issues: write
18-
pull-requests: write
19-
2020
steps:
21-
- name: Send greeting message
21+
- name: Send greeting
2222
uses: actions/first-interaction@v1
2323

2424
with:
@@ -27,23 +27,20 @@ jobs:
2727
issue-message: |
2828
Thank you for opening your first issue in DevPath.
2929
30-
We appreciate your interest in contributing to the project. Before working on an issue, please make sure to:
31-
- Read the README.md and CONTRIBUTING.md files
32-
- Wait until the issue is assigned to you
33-
- Follow the repository guidelines carefully
34-
35-
If you are new to open source, feel free to ask questions in Discussions.
30+
Please make sure to:
31+
- Read CONTRIBUTING.md
32+
- Wait for assignment before starting work
33+
- Follow repository guidelines carefully
3634
3735
Happy contributing.
3836
3937
pr-message: |
4038
Thank you for submitting your first pull request to DevPath.
4139
42-
Please ensure that:
43-
- The PR template is fully completed
44-
- All tests are passing
45-
- Your branch follows the naming conventions
46-
- The PR is linked to an existing issue
47-
- Only issue-related changes are included
40+
Before review:
41+
- Complete the PR template fully
42+
- Ensure all tests pass
43+
- Link your PR to an issue
44+
- Keep changes scoped to the issue
4845
49-
Our maintainers will review your contribution soon. We appreciate your effort and contribution to DevPath.
46+
A maintainer will review your contribution soon.

.github/workflows/label.yml

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

0 commit comments

Comments
 (0)