Skip to content

Commit 0b3ec8d

Browse files
authored
Merge pull request #200 from PrestaShop/3.x
TopContributors with new interface
2 parents fb87f5b + f6465d9 commit 0b3ec8d

File tree

93 files changed

+12255
-44181
lines changed

Some content is hidden

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

93 files changed

+12255
-44181
lines changed

.babelrc

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

.editorconfig

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

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Default host and port for preview and development
2+
HOST=localhost
3+
PORT=3000

.eslintignore

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

.eslintrc.js

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

.github/workflows/ci.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,29 @@ jobs:
1717

1818
steps:
1919
- name: Checkout 🛎
20-
uses: actions/checkout@master
20+
uses: actions/checkout@v4
2121

22-
- name: Setup node env 🏗
23-
uses: actions/setup-node@v2.1.2
22+
- name: Setup Node.js 🏗
23+
uses: actions/setup-node@v4
2424
with:
2525
node-version: ${{ matrix.node }}
2626

27-
- name: Cache node_modules 📦
27+
- name: Setup pnpm 📦
28+
uses: pnpm/action-setup@v3
29+
with:
30+
version: 10
31+
run_install: false
32+
33+
- name: Cache pnpm store 💾
2834
uses: actions/cache@v4
2935
with:
30-
path: ~/.npm
31-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
36+
path: ~/.pnpm-store
37+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
3238
restore-keys: |
33-
${{ runner.os }}-node-
39+
${{ runner.os }}-pnpm-store-
3440
3541
- name: Install dependencies 👨🏻‍💻
36-
run: npm ci
42+
run: pnpm install --frozen-lockfile
3743

3844
- name: Run linter 👀
39-
run: npm run lint
45+
run: pnpm run lint

.github/workflows/gh-pages.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,30 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16+
1617
env:
1718
ENV_USER_PASS: ${{ secrets.ENV_USER_PASS }}
1819

1920
steps:
2021
- name: Checkout 🛎
21-
uses: actions/checkout@master
22+
uses: actions/checkout@v4
2223

2324
- name: Setup PHP env 🏗
2425
uses: shivammathur/setup-php@v2
2526
with:
2627
php-version: 8.4
2728

28-
- name: Setup node env 🏗
29-
uses: actions/setup-node@v2.1.2
29+
- name: Setup Node.js 🏗
30+
uses: actions/setup-node@v4
3031
with:
3132
node-version: 20
3233

34+
- name: Setup pnpm 📦
35+
uses: pnpm/action-setup@v3
36+
with:
37+
version: 10
38+
run_install: false
39+
3340
- name: Get Composer Cache Directory
3441
id: composer-cache
3542
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
@@ -38,49 +45,49 @@ jobs:
3845
uses: actions/cache@v4
3946
with:
4047
path: ${{ steps.composer-cache.outputs.dir }}
41-
key: ubuntu-latest-composer-${{ hashFiles('**/composer.lock') }}
48+
key: composer-${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
4249
restore-keys: |
43-
ubuntu-latest-composer-
50+
composer-${{ runner.os }}-
4451
45-
- name: Cache node_modules 📦
52+
- name: Cache pnpm store 💾
4653
uses: actions/cache@v4
4754
with:
48-
path: ~/.npm
49-
key: ubuntu-latest-node-${{ hashFiles('**/package-lock.json') }}
55+
path: ~/.pnpm-store
56+
key: pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
5057
restore-keys: |
51-
ubuntu-latest-node-
58+
pnpm-${{ runner.os }}-
5259
5360
- name: Install Contributors dependencies 💚
54-
run: npm install
61+
run: pnpm install --frozen-lockfile
5562

5663
- name: Build Contributors Site 👷
57-
run: npm run build && npm run generate
64+
run: pnpm run build && pnpm run generate
5865

5966
- name: Install Traces project 💚
6067
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
6168
run: composer create-project prestashop/traces
6269

63-
- name: Execute `traces:fetch:repositories` 🔧
70+
- name: Fetch repositories 🔧
6471
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
6572
working-directory: ./traces
6673
run: php bin/console traces:fetch:repositories --ghtoken=${ENV_USER_PASS} --config="./config.dist.yml"
6774

68-
- name: Execute `traces:fetch:contributors` 🔧
75+
- name: Fetch contributors 🔧
6976
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
7077
working-directory: ./traces
7178
run: php bin/console traces:fetch:contributors --ghtoken=${ENV_USER_PASS} --config="./config.dist.yml"
7279

73-
- name: Execute `traces:fetch:pullrequests:merged` 🔧
80+
- name: Fetch merged pull requests 🔧
7481
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
7582
working-directory: ./traces
7683
run: php bin/console traces:fetch:pullrequests:merged --ghtoken=${ENV_USER_PASS}
7784

78-
- name: Execute `traces:generate:newcontributors` 🔧
85+
- name: Generate new contributors 🔧
7986
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
8087
working-directory: ./traces
8188
run: php bin/console traces:generate:newcontributors --limitNew=10 --config="./config.dist.yml"
8289

83-
- name: Execute `traces:generate:topcompanies` 🔧
90+
- name: Generate top companies 🔧
8491
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
8592
working-directory: ./traces
8693
run: php bin/console traces:generate:topcompanies --ghtoken=${ENV_USER_PASS} --config="./config.dist.yml"
@@ -89,23 +96,16 @@ jobs:
8996
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
9097
run: cat ./traces/gh_loginsWOCompany.json
9198

92-
- name: Move file (TopContributors) 📁
99+
- name: Move JSON files 📁
93100
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
94101
run: |
95102
mv ./traces/contributors.json ./dist
96103
mv ./traces/contributors_prs.json ./dist
97-
98-
- name: Move file (TopCompanies) 📁
99-
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
100-
run: |
101104
mv ./traces/topcompanies.json ./dist
102105
mv ./traces/topcompanies_prs.json ./dist
106+
mv ./traces/newcontributors.json ./dist
103107
104-
- name: Move file (NewContributors) 📁
105-
if: ${{ github.event_name == 'release' || github.event_name == 'schedule' }}
106-
run: mv ./traces/newcontributors.json ./dist
107-
108-
- name: Write CNAME file
108+
- name: Write CNAME file 🌐
109109
run: echo 'contributors.prestashop-project.org' > ./dist/CNAME
110110

111111
- name: Deploy 🚀

.gitignore

Lines changed: 22 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,30 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Node template
3-
# Logs
4-
/logs
5-
*.log
6-
npm-debug.log*
7-
yarn-debug.log*
8-
yarn-error.log*
9-
10-
# Runtime data
11-
pids
12-
*.pid
13-
*.seed
14-
*.pid.lock
15-
16-
# Directory for instrumented libs generated by jscoverage/JSCover
17-
lib-cov
18-
19-
# Coverage directory used by tools like istanbul
20-
coverage
21-
22-
# nyc test coverage
23-
.nyc_output
24-
25-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26-
.grunt
27-
28-
# Bower dependency directory (https://bower.io/)
29-
bower_components
30-
31-
# node-waf configuration
32-
.lock-wscript
33-
34-
# Compiled binary addons (https://nodejs.org/api/addons.html)
35-
build/Release
36-
37-
# Dependency directories
38-
node_modules/
39-
jspm_packages/
40-
41-
# TypeScript v1 declaration files
42-
typings/
43-
44-
# Optional npm cache directory
45-
.npm
46-
47-
# Optional eslint cache
48-
.eslintcache
49-
50-
# Optional REPL history
51-
.node_repl_history
52-
53-
# Output of 'npm pack'
54-
*.tgz
55-
56-
# Yarn Integrity file
57-
.yarn-integrity
58-
59-
# dotenv environment variables file
60-
.env
61-
62-
# parcel-bundler cache (https://parceljs.org/)
63-
.cache
64-
65-
# next.js build output
66-
.next
67-
68-
# nuxt.js build output
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
694
.nuxt
70-
71-
# Nuxt generate
5+
.nitro
6+
.cache
727
dist
738

74-
# vuepress build output
75-
.vuepress/dist
76-
77-
# Serverless directories
78-
.serverless
79-
80-
# IDE / Editor
81-
.idea
9+
# Node dependencies
10+
node_modules
8211

83-
# Service worker
84-
sw.*
12+
# Logs
13+
logs
14+
*.log
8515

86-
# macOS
16+
# Misc
8717
.DS_Store
18+
.fleet
19+
.idea
20+
.claude
8821

89-
# Vim swap files
90-
*.swp
91-
*.swo
22+
# Local env files
23+
.env
24+
.env.*
25+
!.env.example
9226

93-
# Contributors static datas
94-
static/contributors.json
27+
# Contributors public datas
28+
public/contributors_prs.json
29+
public/newcontributors.json
30+
public/topcompanies_prs.json

.hintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"development"
4+
]
5+
}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
supported-architectures=os:linux;cpu:x64

0 commit comments

Comments
 (0)