Closed CAMOBAP closed 3 years ago
@CAMOBAP the token is indeed available for use in the repository. It allows read/write of repos. Any further permissions needed?
@ronaldtse for some reason it works for metanrorma-cli
repo https://github.com/metanorma/metanorma/pull/168/checks?check_run_id=2101819540, but doesn't work for other repos, for example, metanorma
https://github.com/metanorma/metanorma/pull/168/checks?check_run_id=2101819540
I will continue investigation
@CAMOBAP maybe this is because there is no secret provided in PRs -- only branches can use those secrets?
@ronaldtse https://github.com/metanorma/metanorma/pull/168/checks?check_run_id=2101819540 - also PR but it works
@ronaldtse could you please run
curl -H "Authorization: token ${METANORMA_CI_PAT_TOKEN}" -H 'Accept: application/vnd.github.everest-preview+json' "https://api.github.com/repos/metanorma/metanorma/dispatches" -d '{"event_type": "notify", "client_payload": {}}
With the actual value of METANORMA_CI_PAT_TOKEN
, could you please show me the output of this command
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event"
}
Hmm, @ronaldtse will the same curls works for metanorma-cli
curl -H "Authorization: token ${METANORMA_CI_PAT_TOKEN}" -H 'Accept: application/vnd.github.everest-preview+json' "https://api.github.com/repos/metanorma/metanorma-cli/dispatches" -d '{"event_type": "notify", "client_payload": {}}
@CAMOBAP I just tried again and it works now!
@ronaldtse so both metanorma
and metanorma-cli
works for you, right?
Looks like it works now
Hmm, actually it works for all other repositories except metanorma/metanorma
really strange(
@camobap now that you say it, maybe it's about the metanorma/metanorma repo. Indeed, it was lacking access for @metanorma/ci ... now it's in. Thanks for finding that out!
@ronaldtse could you please check if there is some restrictions where METANORMA_CI_PAT_TOKEN can be used