Add plugin_activity_skipped option (#252)
This commit is contained in:
@@ -15,9 +15,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Load inputs
|
//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)
|
if (!days)
|
||||||
days = Infinity
|
days = Infinity
|
||||||
|
skipped.push(...data.shared["repositories.skipped"])
|
||||||
const codelines = 2
|
const codelines = 2
|
||||||
|
|
||||||
//Get user recent activity
|
//Get user recent activity
|
||||||
@@ -33,6 +34,8 @@
|
|||||||
.map(async({type, payload, actor:{login:actor}, repo:{name:repo}, created_at}) => {
|
.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
|
//See https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/github-event-types
|
||||||
const timestamp = new Date(created_at)
|
const timestamp = new Date(created_at)
|
||||||
|
if ((skipped.includes(repo.split("/").pop()))||(skipped.includes(repo)))
|
||||||
|
return null
|
||||||
switch (type) {
|
switch (type) {
|
||||||
//Commented on a commit
|
//Commented on a commit
|
||||||
case "CommitCommentEvent":{
|
case "CommitCommentEvent":{
|
||||||
|
|||||||
@@ -68,3 +68,11 @@ inputs:
|
|||||||
description: Display events timestamps
|
description: Display events timestamps
|
||||||
type: boolean
|
type: boolean
|
||||||
default: no
|
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 ...
|
||||||
Reference in New Issue
Block a user