We can get various variables in GitHub actions like github.event.repository.default_branch
for getting the default branch.
Is there any field in github
object that can be used to determin if the repo is private or public?
Is there any field in github
object that can be used to determin if the repo is private or public?
Recognized by CI/CD Collective
github.event.repository
is the payload described in the API docs to retrieve one repo. There are two fields you could use:
- There’s a boolean
private
field, sogithub.event.repository.private
- There’s a string-valued
visibility
field, sogithub.event.repository.visibility
(one ofprivate
,public
, orinternal
)