Integration check changes
This commit is contained in:
12
.github/pull_request_template.md
vendored
Normal file
12
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<!--
|
||||||
|
Thank you very much for contributing to this repository !
|
||||||
|
|
||||||
|
Link any related issues (if applicable) to help us keeping track of this project current state.
|
||||||
|
Don't forget to run `npm run test` to ensure that you'll pass status checks validation.
|
||||||
|
-->
|
||||||
|
|
||||||
|
**Pull request description**
|
||||||
|
<!-- A clear and concise description of what your pull request implements or fixs. -->
|
||||||
|
|
||||||
|
**Additional context and screenshots**
|
||||||
|
<!-- Add any other context or screenshots about your pull request here. -->
|
||||||
3
.github/workflows/analysis.yml
vendored
3
.github/workflows/analysis.yml
vendored
@@ -18,7 +18,6 @@ jobs:
|
|||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v1
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
config-file: ./.github/config/codeql.yml
|
||||||
- name: Analyze
|
- name: Analyze
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v1
|
||||||
with:
|
|
||||||
config-file: ./.github/config/codeql.yml
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# 📊 GitHub metrics
|
# 📊 GitHub metrics
|
||||||
|
|
||||||

|
 
|
||||||
|
|
||||||
Generates your own GitHub metrics as an SVG image to put them on your profile page or elsewhere !
|
Generates your own GitHub metrics as an SVG image to put them on your profile page or elsewhere !
|
||||||
See what it looks like below :
|
See what it looks like below :
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
import libxmljs from "libxmljs"
|
import libxmljs from "libxmljs"
|
||||||
import url from "url"
|
import url from "url"
|
||||||
|
|
||||||
//Dirname
|
//Initialization
|
||||||
const __dirname = path.join(path.dirname(url.fileURLToPath(import.meta.url)), "..", "action")
|
const __dirname = path.join(path.dirname(url.fileURLToPath(import.meta.url)), "..", "action")
|
||||||
|
|
||||||
//Die on unhandled rejections
|
|
||||||
process.on("unhandledRejection", error => { throw error })
|
process.on("unhandledRejection", error => { throw error })
|
||||||
|
|
||||||
|
/** Test function */
|
||||||
|
export default async function test() {
|
||||||
//Load GitHub handlers
|
//Load GitHub handlers
|
||||||
const token = process.argv.slice(2)[0]
|
const token = process.argv.slice(2)[0]
|
||||||
const graphql = octokit.graphql.defaults({headers:{authorization: `token ${token}`}})
|
const graphql = octokit.graphql.defaults({headers:{authorization: `token ${token}`}})
|
||||||
@@ -35,5 +35,11 @@
|
|||||||
const code = await build()
|
const code = await build()
|
||||||
if (action !== code)
|
if (action !== code)
|
||||||
throw new Error(`GitHub Action has not been rebuild. Run "npm run build" to solve this issue`)
|
throw new Error(`GitHub Action has not been rebuild. Run "npm run build" to solve this issue`)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Main
|
||||||
|
if (/metrics.mjs/.test(process.argv[1])) {
|
||||||
|
//Test
|
||||||
|
await test()
|
||||||
console.log("Test success !")
|
console.log("Test success !")
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,8 +4,9 @@
|
|||||||
import url from "url"
|
import url from "url"
|
||||||
import ncc from "@vercel/ncc"
|
import ncc from "@vercel/ncc"
|
||||||
|
|
||||||
//Dirname
|
//Initialization
|
||||||
const __dirname = path.join(path.dirname(url.fileURLToPath(import.meta.url)), "..", "action")
|
const __dirname = path.join(path.dirname(url.fileURLToPath(import.meta.url)), "..", "action")
|
||||||
|
process.on("unhandledRejection", error => { throw error })
|
||||||
|
|
||||||
/** Build function */
|
/** Build function */
|
||||||
export default async function build() {
|
export default async function build() {
|
||||||
@@ -35,5 +36,5 @@
|
|||||||
if (/build.mjs/.test(process.argv[1])) {
|
if (/build.mjs/.test(process.argv[1])) {
|
||||||
//Save build
|
//Save build
|
||||||
await fs.promises.writeFile(`${__dirname}/dist/index.js`, await build())
|
await fs.promises.writeFile(`${__dirname}/dist/index.js`, await build())
|
||||||
console.log("Build successful !")
|
console.log("Build success !")
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user