Skip to content

Commit

Permalink
super-linterアップデート (#1337)
Browse files Browse the repository at this point in the history
* Update super-linter/super-linter action to v6.8.0

* super-linterによる指摘事項修正

* prettierを使う

* gitleaksをアップデートしてあげたよ! (#1338)

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>
  • Loading branch information
3 people authored Aug 8, 2024
1 parent 82a8481 commit 40f9f51
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: super-linter/super-linter/slim@v6.7.0
uses: super-linter/super-linter/slim@v6.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: main
LINTER_RULES_PATH: .
VALIDATE_JSCPD: false
JAVASCRIPT_DEFAULT_STYLE: prettier
VALIDATE_JAVASCRIPT_STANDARD: false
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
repos:
- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.3
rev: v8.18.4
hooks:
- id: gitleaks
52 changes: 27 additions & 25 deletions scripts/action/remove_prs_and_issues.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
module.exports = async ({ github }) => {
const projectData = process.env.PROJECT_URL.match(/https:\/\/github.com\/orgs\/([^/]+)\/projects\/([^/]+)/)
let itemCursor
const projectData = process.env.PROJECT_URL.match(
/https:\/\/github.com\/orgs\/([^/]+)\/projects\/([^/]+)/,
);
let itemCursor;

for (let i = 0; i < 3; i++) {
let itemNum
let itemNum;

if (i === 0) {
itemNum = 50
itemNum = 50;
} else {
itemNum = 10
itemNum = 10;
}

let afterQuery = ''
let afterQuery = "";

if (itemCursor !== undefined) {
afterQuery = `, after: "${itemCursor}"`
afterQuery = `, after: "${itemCursor}"`;
}

const getProjectV2ItemsQuery = `
Expand Down Expand Up @@ -45,29 +47,29 @@ module.exports = async ({ github }) => {
}
}
}
`
console.log(getProjectV2ItemsQuery)
const projectV2Items = await github.graphql(getProjectV2ItemsQuery)
const projectV2 = projectV2Items.organization.projectV2
const items = projectV2.items
`;
console.log(getProjectV2ItemsQuery);
const projectV2Items = await github.graphql(getProjectV2ItemsQuery);
const projectV2 = projectV2Items.organization.projectV2;
const items = projectV2.items;

if (items.totalCount < 1200) {
return
return;
}

const closedItems = items.nodes.filter(v => v.content.closed)
const closedItems = items.nodes.filter((v) => v.content.closed);

if (closedItems.length === 0) {
const pageInfo = items.pageInfo
const pageInfo = items.pageInfo;
if (pageInfo.hasNextPage) {
itemCursor = pageInfo.endCursor
continue
itemCursor = pageInfo.endCursor;
continue;
} else {
return
return;
}
}

const item = closedItems[0]
const item = closedItems[0];
const deleteItemFromProjectQuery = `
mutation {
deleteProjectV2Item(
Expand All @@ -76,10 +78,10 @@ module.exports = async ({ github }) => {
deletedItemId
}
}
`
console.log(item.content.url)
console.log(deleteItemFromProjectQuery)
console.log(await github.graphql(deleteItemFromProjectQuery))
return
`;
console.log(item.content.url);
console.log(deleteItemFromProjectQuery);
console.log(await github.graphql(deleteItemFromProjectQuery));
return;
}
}
};

0 comments on commit 40f9f51

Please sign in to comment.