Skip to content

Commit f973ee9

Browse files
massongitrenovate[bot]github-actions[bot]
authored
super-linterアップデート (#1051)
* Update super-linter/super-linter action to v6.8.0 * super-linterによる指摘事項修正 * prettierを使う * gitleaksをアップデートしてあげたよ! (#1052) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 4c88d56 commit f973ee9

File tree

4 files changed

+53
-36
lines changed

4 files changed

+53
-36
lines changed

.github/workflows/super-linter.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ jobs:
5252
# Run Linter against code base #
5353
################################
5454
- name: Lint Code Base
55-
uses: super-linter/super-linter/slim@v6.7.0
55+
uses: super-linter/super-linter/slim@v6.8.0
5656
env:
5757
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5858
DEFAULT_BRANCH: main
5959
LINTER_RULES_PATH: .
6060
VALIDATE_JSCPD: false
61+
JAVASCRIPT_DEFAULT_STYLE: prettier
62+
VALIDATE_JAVASCRIPT_STANDARD: false
6163
concurrency:
6264
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
6365
cancel-in-progress: true

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
repos:
33
- repo: https://github.com/zricethezav/gitleaks
4-
rev: v8.18.3
4+
rev: v8.18.4
55
hooks:
66
- id: gitleaks

scripts/action/clean-cache.js

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,63 @@
1-
async function getActionsGetActionsCacheList ({ github, context }) {
1+
async function getActionsGetActionsCacheList({ github, context }) {
22
const actionsGetActionsCacheListParams = {
33
owner: context.repo.owner,
44
repo: context.repo.repo,
5-
sort: 'last_accessed_at',
6-
direction: 'asc'
7-
}
8-
console.log('call actions.getActionsCacheList', actionsGetActionsCacheListParams)
5+
sort: "last_accessed_at",
6+
direction: "asc",
7+
};
8+
console.log(
9+
"call actions.getActionsCacheList",
10+
actionsGetActionsCacheListParams,
11+
);
912
return github.paginate(
1013
github.rest.actions.getActionsCacheList,
11-
actionsGetActionsCacheListParams
12-
)
14+
actionsGetActionsCacheListParams,
15+
);
1316
}
1417

15-
function getSumSize (actionsGetActionsCacheList) {
16-
return actionsGetActionsCacheList.reduce((sum, size) => sum + (size.size_in_bytes ?? 0), 0)
18+
function getSumSize(actionsGetActionsCacheList) {
19+
return actionsGetActionsCacheList.reduce(
20+
(sum, size) => sum + (size.size_in_bytes ?? 0),
21+
0,
22+
);
1723
}
1824

1925
module.exports = async ({ github, context }) => {
20-
let actionsGetActionsCacheList = await getActionsGetActionsCacheList({ github, context })
21-
let sumSize = getSumSize(actionsGetActionsCacheList)
26+
let actionsGetActionsCacheList = await getActionsGetActionsCacheList({
27+
github,
28+
context,
29+
});
30+
let sumSize = getSumSize(actionsGetActionsCacheList);
2231

2332
for (let i = 0; i < 40 && 7 * 1024 * 1024 * 1024 < sumSize; i++) {
24-
const actionCache = actionsGetActionsCacheList.shift()
33+
const actionCache = actionsGetActionsCacheList.shift();
2534
const actionsDeleteActionsCacheByKey = {
2635
owner: context.repo.owner,
2736
repo: context.repo.repo,
28-
key: actionCache.key
29-
}
30-
console.log('call actions.deleteActionsCacheByKey', actionsDeleteActionsCacheByKey)
37+
key: actionCache.key,
38+
};
39+
console.log(
40+
"call actions.deleteActionsCacheByKey",
41+
actionsDeleteActionsCacheByKey,
42+
);
3143

3244
try {
3345
await github.rest.actions.deleteActionsCacheByKey(
34-
actionsDeleteActionsCacheByKey
35-
)
46+
actionsDeleteActionsCacheByKey,
47+
);
3648
} catch (e) {
3749
if (e.status === 404) {
38-
actionsGetActionsCacheList = await getActionsGetActionsCacheList({ github, context })
39-
sumSize = getSumSize(actionsGetActionsCacheList)
40-
continue
50+
actionsGetActionsCacheList = await getActionsGetActionsCacheList({
51+
github,
52+
context,
53+
});
54+
sumSize = getSumSize(actionsGetActionsCacheList);
55+
continue;
4156
}
4257

43-
throw e
58+
throw e;
4459
}
4560

46-
sumSize -= actionCache.size_in_bytes
61+
sumSize -= actionCache.size_in_bytes;
4762
}
48-
}
63+
};
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
const fs = require('fs')
2-
const yaml = require('js-yaml')
1+
const fs = require("fs");
2+
const yaml = require("js-yaml");
33

44
module.exports = () => {
5-
const ymlFile = yaml.load(fs.readFileSync('action.yml', 'utf8'))
6-
const inputs = ymlFile.inputs
7-
const rows = ['| 引数名 | 説明 | 必須 |', '|:---:|:---:|:---:|']
5+
const ymlFile = yaml.load(fs.readFileSync("action.yml", "utf8"));
6+
const inputs = ymlFile.inputs;
7+
const rows = ["| 引数名 | 説明 | 必須 |", "|:---:|:---:|:---:|"];
88

99
for (const inputName of Object.keys(inputs)) {
10-
let row = `| ${inputName} | ${inputs[inputName].description} | `
10+
let row = `| ${inputName} | ${inputs[inputName].description} | `;
1111

1212
if (inputs[inputName].default === undefined && inputs[inputName].required) {
13-
row += 'O'
13+
row += "O";
1414
}
1515

16-
row += ' |'
17-
rows.push(row)
16+
row += " |";
17+
rows.push(row);
1818
}
1919

20-
return rows.join('\n')
21-
}
20+
return rows.join("\n");
21+
};

0 commit comments

Comments
 (0)