Skip to content

Commit 21a8e7c

Browse files
committed
Documentation and workflows updates
1 parent 1051a97 commit 21a8e7c

588 files changed

Lines changed: 119 additions & 145187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/labeler.yml

Lines changed: 24 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,50 @@
1-
2-
31
documentation:
4-
- changed-files:
5-
- any-glob-to-any-file:
6-
- '**/*.md'
7-
- 'docs/**'
2+
- '**/*.md'
3+
- 'docs/**'
84

95
python:
10-
- changed-files:
11-
- any-glob-to-any-file:
12-
- '**/*.py'
13-
6+
- '**/*.py'
147

158
github-actions:
16-
- changed-files:
17-
- any-glob-to-any-file:
18-
- '.github/**'
19-
9+
- '.github/**'
2010

2111
enhancement:
22-
- changed-files:
23-
- any-glob-to-any-file:
24-
25-
- 'src/**'
26-
- '*/**.py'
12+
- 'src/**'
13+
- '*/**.py'
2714

2815
beginner:
29-
- changed-files:
30-
31-
- any-glob-to-any-file:
32-
- '**/*.md'
16+
- '**/*.md'
3317

3418
intermediate:
35-
36-
- changed-files:
37-
- any-glob-to-any-file:
38-
- '**/*.py'
39-
19+
- '**/*.py'
4020

4121
advanced:
42-
- changed-files:
43-
- any-glob-to-any-file:
44-
- '.github/**'
45-
- 'tests/**'
22+
- '.github/**'
23+
- 'tests/**'
4624

4725
"type:design":
48-
- changed-files:
49-
- any-glob-to-any-file:
50-
- 'web-app/**'
51-
- 'web-app/*.html'
52-
- 'web-app/js/**'
53-
- 'web-app/css/**'
26+
- 'web-app/**'
27+
- 'web-app/*.html'
28+
- 'web-app/js/**'
29+
- 'web-app/css/**'
5430

5531
"type:feature":
56-
- changed-files:
57-
- any-glob-to-any-file:
58-
- '**/*.py'
32+
- '**/*.py'
5933

6034
"type:docs":
61-
- changed-files:
62-
- any-glob-to-any-file:
63-
- '**/*.md'
64-
- 'README.html'
65-
- 'docs/**'
35+
- '**/*.md'
36+
- 'README.html'
37+
- 'docs/**'
6638

6739
"type:devops":
68-
- changed-files:
69-
- any-glob-to-any-file:
70-
- '.github/**'
71-
- '.github/workflows/**'
40+
- '.github/**'
41+
- '.github/workflows/**'
7242

7343
"type:refactor":
74-
- changed-files:
75-
- any-glob-to-any-file:
76-
- '**/*.py'
77-
- 'web-app/**'
44+
- '**/*.py'
45+
- 'web-app/**'
7846

7947
"type:bug":
80-
- changed-files:
81-
- any-glob-to-any-file:
82-
- '**/*.py'
83-
- 'tests/**'
48+
- '**/*.py'
49+
- 'tests/**'
8450

.github/workflows/labeler.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Update Contributors
2+
3+
on:
4+
pull_request_target:
5+
types: [closed]
6+
7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
update_contributors:
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Add contributor to README
19+
uses: actions/github-script@v7
20+
with:
21+
script: |
22+
const owner = context.repo.owner;
23+
const repo = context.repo.repo;
24+
const author = context.payload.pull_request.user.login;
25+
const path = 'README.md';
26+
27+
// Fetch current README
28+
const { data: file } = await github.rest.repos.getContent({ owner, repo, path });
29+
const content = Buffer.from(file.content, file.encoding).toString();
30+
31+
const header = '## 🙌 Contributors';
32+
33+
if (content.includes(author)) {
34+
console.log(`Contributor ${author} already present; no update needed.`);
35+
return;
36+
}
37+
38+
let newContent;
39+
40+
if (!content.includes(header)) {
41+
// Append a Contributors section
42+
newContent = content + `\n\n## 🙌 Contributors\n\n- ${author}\n`;
43+
} else {
44+
// Insert the contributor bullet directly after the header
45+
const idx = content.indexOf(header) + header.length;
46+
const before = content.slice(0, idx);
47+
const after = content.slice(idx);
48+
newContent = before + '\n\n- ' + author + '\n' + after;
49+
}
50+
51+
const updatedBase64 = Buffer.from(newContent).toString('base64');
52+
53+
await github.rest.repos.createOrUpdateFileContents({
54+
owner,
55+
repo,
56+
path,
57+
message: `chore: add contributor ${author}`,
58+
content: updatedBase64,
59+
sha: file.sha,
60+
committer: { name: 'github-actions[bot]', email: '41898282+github-actions[bot]@users.noreply.github.com' }
61+
});
62+
63+
- name: Thank contributor comment
64+
uses: actions/github-script@v7
65+
with:
66+
script: |
67+
await github.rest.issues.createComment({
68+
issue_number: context.payload.pull_request.number,
69+
owner: context.repo.owner,
70+
repo: context.repo.repo,
71+
body: `Thanks @${context.payload.pull_request.user.login}! I've added you to the contributors list.`
72+
});

.local/secondary_skills/LICENSE.txt

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

.local/secondary_skills/ad-creative/.fingerprint

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)