ep_stats 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/automerge.yml +30 -0
- package/index.js +1 -0
- package/package.json +1 -1
- package/static/js/stats.js +2 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Dependabot Automerge
|
|
2
|
+
permissions:
|
|
3
|
+
contents: write
|
|
4
|
+
pull-requests: write
|
|
5
|
+
on:
|
|
6
|
+
workflow_run:
|
|
7
|
+
workflows:
|
|
8
|
+
- Node.js Package
|
|
9
|
+
types:
|
|
10
|
+
- completed
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
automerge:
|
|
14
|
+
if: >
|
|
15
|
+
github.event.workflow_run.conclusion == 'success' &&
|
|
16
|
+
github.event.workflow_run.event == 'pull_request' &&
|
|
17
|
+
github.event.workflow_run.actor.login == 'dependabot[bot]'
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v6
|
|
22
|
+
|
|
23
|
+
- name: Automerge
|
|
24
|
+
uses: "pascalgn/automerge-action@v0.16.4"
|
|
25
|
+
env:
|
|
26
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
+
MERGE_METHOD: squash
|
|
28
|
+
MERGE_LABELS: ""
|
|
29
|
+
MERGE_RETRY_SLEEP: "100000"
|
|
30
|
+
|
package/index.js
CHANGED
package/package.json
CHANGED
package/static/js/stats.js
CHANGED
|
@@ -164,6 +164,7 @@ stats.authors = {
|
|
|
164
164
|
if (spanClass.indexOf('author') !== -1) { // if an author class exists on this span
|
|
165
165
|
results[spanClass] = number;
|
|
166
166
|
} else {
|
|
167
|
+
if (!results[spanClass]) results[spanClass] = 0;
|
|
167
168
|
results[spanClass] += 1;
|
|
168
169
|
}
|
|
169
170
|
});
|
|
@@ -183,7 +184,7 @@ stats.authors = {
|
|
|
183
184
|
classes = classes.split(' ');
|
|
184
185
|
const number = $(this).text().replace(/\s/g, '').length; // get length without whitespace
|
|
185
186
|
$.each(classes, (k, spanClass) => {
|
|
186
|
-
if (
|
|
187
|
+
if (spanClass.indexOf('author') !== -1) { // if an author class exists on this span
|
|
187
188
|
results[spanClass] = number;
|
|
188
189
|
} else {
|
|
189
190
|
results[spanClass] += number;
|