Update readme and remove selfskip plugin (#18)
* Update readme and remove selfskip plugin * Use relative links instead for images * Private contributions
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
traffic:"Pages views",
|
||||
lines:"Lines of code changed",
|
||||
habits:"Coding habits",
|
||||
selfskip:"Skip metrics commits",
|
||||
music:"Music plugin",
|
||||
posts:"Recent posts",
|
||||
isocalendar:"Isometric commit calendar",
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
import pagespeed from "./pagespeed/index.mjs"
|
||||
import posts from "./posts/index.mjs"
|
||||
import projects from "./projects/index.mjs"
|
||||
import selfskip from "./selfskip/index.mjs"
|
||||
import topics from "./topics/index.mjs"
|
||||
import traffic from "./traffic/index.mjs"
|
||||
|
||||
@@ -27,7 +26,6 @@
|
||||
pagespeed,
|
||||
posts,
|
||||
projects,
|
||||
selfskip,
|
||||
topics,
|
||||
traffic,
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
//Setup
|
||||
export default async function ({login, rest, computed, q}, {enabled = false} = {}) {
|
||||
//Plugin execution
|
||||
try {
|
||||
//Check if plugin is enabled and requirements are met
|
||||
if ((!enabled)||(!q.selfskip))
|
||||
return null
|
||||
//Search for auto-generated commits
|
||||
let commits = 0
|
||||
for (let page = 0;;page++) {
|
||||
const {data} = await rest.repos.listCommits({owner:login, repo:login, author:login, per_page:100, page})
|
||||
commits += data.filter(({commit}) => /\[Skip GitHub Action\]/.test(commit.message)).length
|
||||
if (!data.length)
|
||||
break
|
||||
}
|
||||
//Results
|
||||
computed.commits -= commits
|
||||
return {commits}
|
||||
}
|
||||
//Handle errors
|
||||
catch (error) {
|
||||
console.debug(error)
|
||||
throw {error:{message:`An error occured`}}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user