{"info":{"_postman_id":"b09b0d54-eeaf-4664-9060-fbc49e232c92","name":"Localhost","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"26480466","collectionId":"b09b0d54-eeaf-4664-9060-fbc49e232c92","publishedId":"2sA3kPoiqZ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-07-14T23:58:09.000Z"},"item":[{"name":"Collector-Events","item":[{"name":"Compute metric from collector localhost (scope y collector en local)","id":"9d77a33b-2fa0-4aac-8680-817098fcf042","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"config\": {\r\n        \"scopeManager\": \"http://localhost:5700/api/v1/scopes/development\"\r\n    },\r\n    \"metric\": { //<-- Metric that will be calculated by the collector\r\n        \"computing\": \"actual\",\r\n        \"element\": \"number\",\r\n        \"event\": {\r\n            \"githubGQL\": {\r\n                \"custom\": {\r\n                    \"type\": \"graphQL\",\r\n                    \"title\": \"Get issues in progress\",\r\n                    \"steps\": {\r\n                        \"0\": {\r\n                            \"type\": \"queryGetObject\",\r\n                            \"query\": \"{repository(name: \\\"%PROJECT.github.repository%\\\", owner: \\\"%PROJECT.github.repoOwner%\\\") {\\r\\n    projectsV2(first: 5) {\\r\\n      nodes {\\r\\n        items(first: 100) {\\r\\n          nodes {\\r\\n            content {\\r\\n              ... on Issue {\\r\\n                bodyText\\r\\n                updatedAt\\r\\n                number\\r\\n                author {\\r\\n                  login\\r\\n                }\\r\\n                assignees(first: 5  ) {\\r\\n                    nodes {\\r\\n                        login\\r\\n                    }\\r\\n                }\\r\\n              }\\r\\n            }\\r\\n            fieldValues(first: 100) {\\r\\n              nodes {\\r\\n                ... on ProjectV2ItemFieldUserValue {\\r\\n                    field {\\r\\n                        ... on ProjectV2Field {\\r\\n                            name\\r\\n                        }\\r\\n                    }\\r\\n                }\\r\\n                ... on ProjectV2ItemFieldRepositoryValue {\\r\\n                  field {\\r\\n                    ... on ProjectV2Field {\\r\\n                      name\\r\\n                    }\\r\\n                  }\\r\\n                  repository {\\r\\n                    nameWithOwner\\r\\n                  }\\r\\n                }\\r\\n                ... on ProjectV2ItemFieldTextValue {\\r\\n                  text\\r\\n                  field {\\r\\n                    ... on ProjectV2Field {\\r\\n                      name\\r\\n                    }\\r\\n                  }\\r\\n                }\\r\\n                ... on ProjectV2ItemFieldMilestoneValue {\\r\\n                    field {\\r\\n                        ... on ProjectV2Field {\\r\\n                            name\\r\\n                        }\\r\\n                    }\\r\\n                    milestone {\\r\\n                        number\\r\\n                        title \\r\\n                    }\\r\\n                }\\r\\n                ... on ProjectV2ItemFieldSingleSelectValue {\\r\\n                  name\\r\\n                  updatedAt\\r\\n                  creator {\\r\\n                    login\\r\\n                  }\\r\\n                  field {\\r\\n                    ... on ProjectV2SingleSelectField {\\r\\n                      name\\r\\n                    }\\r\\n                  }\\r\\n                }\\r\\n              }\\r\\n            }\\r\\n          }\\r\\n        }\\r\\n      }\\r\\n    }\\r\\n  }\\r\\n}\",\r\n                            \"cache\": true\r\n                        },\r\n                        \"1\": {\r\n                            \"type\": \"objectGetSubObjects\",\r\n                            \"location\": \"data.repository.projectsV2.nodes.0.items.nodes\"\r\n                        },\r\n                        \"2\": {\r\n                            \"type\": \"objectsFilterObjects\",\r\n                            \"filters\": [\r\n                                \"content.assignees.nodes.*any*.login == '%MEMBER.github.username%'\"\r\n                            ]\r\n                        },\r\n                        \"3\": {\r\n                            \"type\": \"runScript\",\r\n                            \"variables\": {},\r\n                            \"script\": \"module.exports.generic = function getFieldValues(inputData, variables) {\\r\\n    let result = [];\\r\\n    for (const issue of inputData) {\\r\\n        for (const fieldValue of issue.fieldValues.nodes) {\\r\\n            if (fieldValue.name === 'In Progress') {\\r\\n                               result.push(issue);\\r\\n                \\r\\n            }\\r\\n        }\\r\\n    }\\r\\n    return result;\\r\\n}\"\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        },\r\n        \"scope\": {\r\n            \"project\": \"showcase-GH-governify_bluejay-showcase\", //<-- ID of the project that will be tested\r\n            \"class\": \"showcase\", //<-- Class of the project that will be tested\r\n            \"member\": \"*\" //<-- Add this if the metric is calculated for each member\r\n        },\r\n        \"window\": {\r\n            \"type\": \"static\",\r\n            \"period\": \"hourly\", //<-- Choose the period for the calculation (hourly/daily/weekly/biweekly/monthly/bimonthly/annually)\r\n            \"initial\": \"2022-04-07T02:00:00.000Z\", //<-- Set the initial of the period\r\n            \"from\": \"2022-04-07T02:00:00.000Z\", //<-- Set the start of the period\r\n            \"end\": \"2022-04-07T02:59:59.999Z\", //<-- Set the end of the period\r\n            \"timeZone\": \"America/Los_Angeles\" //<-- Set the time zone for the calculation\r\n        }\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5500/api/v2/computations","urlObject":{"protocol":"http","port":"5500","path":["api","v2","computations"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9d77a33b-2fa0-4aac-8680-817098fcf042"},{"name":"Compute metric from collector host.docker.internal (docker)","id":"3bdd74a3-45ce-4549-8d36-58271b095537","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"config\": {\r\n        \"scopeManager\": \"http://host.docker.internal:5700/api/v1/scopes/development\"\r\n    },\r\n    \"metric\": {\r\n        \"computing\": \"actual\",\r\n        \"element\": \"number\",\r\n        \"event\": {\r\n            \"githubGQL\": {\r\n                \"custom\": {\r\n                    \"type\": \"graphQL\",\r\n                    \"title\": \"Get issues in progress\",\r\n                    \"steps\": {\r\n                        \"0\": {\r\n                            \"type\": \"queryGetObject\",\r\n                            \"query\": \"{repository(name: \\\"%PROJECT.github.repository%\\\", owner: \\\"%PROJECT.github.repoOwner%\\\") {\\r\\n    projectsV2(first: 5) {\\r\\n      nodes {\\r\\n        items(first: 100) {\\r\\n          nodes {\\r\\n            content {\\r\\n              ... on Issue {\\r\\n                bodyText\\r\\n                updatedAt\\r\\n                number\\r\\n                author {\\r\\n                  login\\r\\n                }\\r\\n                assignees(first: 5  ) {\\r\\n                    nodes {\\r\\n                        login\\r\\n                    }\\r\\n                }\\r\\n              }\\r\\n            }\\r\\n            fieldValues(first: 100) {\\r\\n              nodes {\\r\\n                ... on ProjectV2ItemFieldUserValue {\\r\\n                    field {\\r\\n                        ... on ProjectV2Field {\\r\\n                            name\\r\\n                        }\\r\\n                    }\\r\\n                }\\r\\n                ... on ProjectV2ItemFieldRepositoryValue {\\r\\n                  field {\\r\\n                    ... on ProjectV2Field {\\r\\n                      name\\r\\n                    }\\r\\n                  }\\r\\n                  repository {\\r\\n                    nameWithOwner\\r\\n                  }\\r\\n                }\\r\\n                ... on ProjectV2ItemFieldTextValue {\\r\\n                  text\\r\\n                  field {\\r\\n                    ... on ProjectV2Field {\\r\\n                      name\\r\\n                    }\\r\\n                  }\\r\\n                }\\r\\n                ... on ProjectV2ItemFieldMilestoneValue {\\r\\n                    field {\\r\\n                        ... on ProjectV2Field {\\r\\n                            name\\r\\n                        }\\r\\n                    }\\r\\n                    milestone {\\r\\n                        number\\r\\n                        title \\r\\n                    }\\r\\n                }\\r\\n                ... on ProjectV2ItemFieldSingleSelectValue {\\r\\n                  name\\r\\n                  updatedAt\\r\\n                  creator {\\r\\n                    login\\r\\n                  }\\r\\n                  field {\\r\\n                    ... on ProjectV2SingleSelectField {\\r\\n                      name\\r\\n                    }\\r\\n                  }\\r\\n                }\\r\\n              }\\r\\n            }\\r\\n          }\\r\\n        }\\r\\n      }\\r\\n    }\\r\\n  }\\r\\n}\",\r\n                            \"cache\": true\r\n                        },\r\n                        \"1\": {\r\n                            \"type\": \"objectGetSubObjects\",\r\n                            \"location\": \"data.repository.projectsV2.nodes.0.items.nodes\"\r\n                        },\r\n                        \"2\": {\r\n                            \"type\": \"objectsFilterObjects\",\r\n                            \"filters\": [\r\n                                \"content.assignees.nodes.*any*.login == '%MEMBER.github.username%'\"\r\n                            ]\r\n                        },\r\n                        \"3\": {\r\n                            \"type\": \"runScript\",\r\n                            \"variables\": {},\r\n                            \"script\": \"module.exports.generic = function getFieldValues(inputData, variables) {\\r\\n    let result = [];\\r\\n    for (const issue of inputData) {\\r\\n        for (const fieldValue of issue.fieldValues.nodes) {\\r\\n            if (fieldValue.name === 'In Progress') {\\r\\n                               result.push(issue);\\r\\n                \\r\\n            }\\r\\n        }\\r\\n    }\\r\\n    return result;\\r\\n}\"\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        },\r\n        \"scope\": {\r\n            \"project\": \"showcase-GH-governify_bluejay-showcase\",\r\n            \"class\": \"showcase\",\r\n            \"member\": \"*\"\r\n        },\r\n        \"window\": {\r\n            \"type\": \"static\",\r\n            \"period\": \"hourly\",\r\n            \"initial\": \"2022-04-07T02:00:00.000Z\",\r\n            \"from\": \"2022-04-07T02:00:00.000Z\",\r\n            \"end\": \"2022-04-07T02:59:59.999Z\",\r\n            \"timeZone\": \"America/Los_Angeles\"\r\n        }\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5500/api/v2/computations","urlObject":{"protocol":"http","port":"5500","path":["api","v2","computations"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3bdd74a3-45ce-4549-8d36-58271b095537"}],"id":"c2e320f0-5dc7-485c-b0fe-4197efde5d29","_postman_id":"c2e320f0-5dc7-485c-b0fe-4197efde5d29","description":""}]}