Add plugin_activity_skipped option (#252)

This commit is contained in:
Simon Lecoq
2021-04-22 19:00:04 +02:00
committed by GitHub
parent 6d6e483a82
commit a0489a42a1
2 changed files with 12 additions and 1 deletions

View File

@@ -15,9 +15,10 @@
}
//Load inputs
let {limit, days, filter, visibility, timestamps} = imports.metadata.plugins.activity.inputs({data, q, account})
let {limit, days, filter, visibility, timestamps, skipped} = imports.metadata.plugins.activity.inputs({data, q, account})
if (!days)
days = Infinity
skipped.push(...data.shared["repositories.skipped"])
const codelines = 2
//Get user recent activity
@@ -33,6 +34,8 @@
.map(async({type, payload, actor:{login:actor}, repo:{name:repo}, created_at}) => {
//See https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/github-event-types
const timestamp = new Date(created_at)
if ((skipped.includes(repo.split("/").pop()))||(skipped.includes(repo)))
return null
switch (type) {
//Commented on a commit
case "CommitCommentEvent":{

View File

@@ -68,3 +68,11 @@ inputs:
description: Display events timestamps
type: boolean
default: no
# List of repositories that will be skipped
plugin_activity_skipped:
description: Repositories to skip
type: array
format: comma-separated
default: ""
example: my-repo-1, my-repo-2, owner/repo-3 ...