I run into problem while setting up the metrics action for repo under "Organization account". I do have 2 user accounts with access to that repo (both do have all tokens setup and ready to go).
Problem is, that repo link is: SPECTADO/muj.dobryandel.cz (private repo) but SPECTADO is not user.
token: ${{ secrets.METRICS_TOKEN }}
committer_token: ${{ secrets.GITHUB_TOKEN }}
template: repository
# user: 'SPECTADO'
query: '{"repo":"muj.dobryandel.cz"}'
An error occured, logging debug message :
metrics/compute/SPECTADO > start
{
repo: 'muj.dobryandel.cz',
base: false,
'base.header': true,
'base.activity': true,
'base.community': true,
'base.repositories': true,
'base.metadata': true,
'config.timezone': undefined,
'config.output': 'svg',
'config.animations': true,
'config.padding': '6%',
repositories: 100,
template: 'repository'
}
metrics/compute/SPECTADO > graphql query
Error: user not found
Error: Process completed with exit code 1.
If I leave user unset (or set it to real user), I got this: (master-spectado/muj.dobryandel.cz is invalid link to repo)
An error occured, logging debug message :
metrics/compute/master-spectado > start
{
repo: 'muj.dobryandel.cz',
base: false,
'base.header': true,
'base.activity': true,
'base.community': true,
'base.repositories': true,
'base.metadata': true,
'config.timezone': undefined,
'config.output': 'svg',
'config.animations': true,
'config.padding': '6%',
at /metrics/node_modules/@octokit/request/dist-node/index.js:66:23
at processTicksAndRejections (node:internal/process/task_queues:93:5)
at async default (file:///metrics/source/templates/repository/template.mjs:24:24)
at async metrics (file:///metrics/source/app/metrics.mjs:71:11)
at async file:///metrics/source/app/action/index.mjs:255:28 {
status: 404,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset',
connection: 'close',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Thu, 21 Jan 2021 10:24:32 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
status: '404 Not Found',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-accepted-oauth-scopes': 'repo',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': '0400:4719:408E90:9B3FFA:60095660',
'x-oauth-scopes': '',
'x-ratelimit-limit': '5000',
'x-ratelimit-remaining': '4998',
'x-ratelimit-reset': '1611228272',
'x-ratelimit-used': '2',
'x-xss-protection': '1; mode=block'
},
request: {
method: 'GET',
url: 'https://api.github.com/repos/master-spectado/muj.dobryandel.cz/commits?per_page=100&page=0',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-core.js/3.2.4 Node.js/15.5.1 (linux; x64)',
authorization: 'token [REDACTED]'
},
request: { agent: [Agent], hook: [Function: bound bound register] }
},
documentation_url: 'https://docs.github.com/rest/reference/repos#list-commits'
}
'config.order': [],
repositories: 100,
'repositories.forks': false,
template: 'repository'
}
metrics/compute/master-spectado > content order : base.header,followup,languages,projects,pagespeed,stargazers
metrics/compute/master-spectado > graphql query
metrics/compute/master-spectado > retrieving repositories after null
metrics/compute/master-spectado > keeping only 100 repositories
metrics/compute/master-spectado > loaded 0 repositories
metrics/compute/master-spectado > compute
metrics/compute/master-spectado/muj.dobryandel.cz > retrieving single repository muj.dobryandel.cz
metrics/compute/master-spectado/muj.dobryandel.cz > querying api for commits
metrics/compute/master-spectado/muj.dobryandel.cz > loading page 0
Error: Not Found
Error: Process completed with exit code 1.
Is there a way how to configure it to access repo under "Organization account"? Meaning that user account and part before repo name won't be the same?
And yes, setting query: '{"repo":"SPECTADO/muj.dobryandel.cz"}'
won't work because resulting path will be master-spectado/SPECTADO/muj.dobryandel.cz