zapman449
(Jason Price)
1
Is there a better way to determine if a repo is enabled in drone than:
drone repo info ${REPO} | grep "^Config: [a-zA-Z0-9.]"
and test the error code?
The goal is to drone repo chown
all active repos… but this feels gross:
for REPO in $(drone repo ls) ; do
if drone repo info ${REPO} | grep "^Config: [a-zA-Z0-9.].*$" ; then
drone repo chown ${REPO}
fi
done
you can print the repository active flag to determine whether or not it has been enabled:
$ drone repo info ${REPO} --format="{{ .Active }}"
true
zapman449
(Jason Price)
3
Thank you.
It’d be wonderful if there was a flag to drone repo ls
to filter by active vs disabled repos.
It’d be wonderful if there was a flag to drone repo ls
to filter by active vs disabled repos.
perhaps you would consider sending a pull request to drone/drone-cli?