dokku / dokku

A docker-powered PaaS that helps you build and manage the lifecycle of applications
https://dokku.com
MIT License
28.7k stars 1.9k forks source link

Adding app name to `dokku apps:report` #7092

Open zachahn opened 2 weeks ago

zachahn commented 2 weeks ago

Description of feature

Hello!

I'm using dokku apps:report --format json for a small script. At some point before, the key app-deploy-source used to hold the application name, but now it seems to be git push.

Could we add a new key to the JSON output that lists the application name? (I see my dokku version is slightly out of date, but the code doesn't seem to return what I'm looking for)

$ dokku --version
dokku version 0.34.8

Current output

$ dokku apps:report --format json
{"app-created-at":"1724893494","app-deploy-source":"git-push","app-deploy-source-metadata":"7ad094be7ab23b7653c97d9761984811","app-dir":"/home/dokku/my-cool-app","app-locked":"false"}
{"app-created-at":"1722741576","app-deploy-source":"git-push","app-deploy-source-metadata":"f40f1652f8645835ca0813681ab4e8a6","app-dir":"/home/dokku/my-nice-app","app-locked":"false"}

Requested output

$ dokku apps:report --format json
{"app-name": "my-cool-app", "app-created-at":"1724893494","app-deploy-source":"git-push","app-deploy-source-metadata":"7ad094be7ab23b7653c97d9761984811","app-dir":"/home/dokku/my-cool-app","app-locked":"false"}
{"app-name": "my-nice-app", "app-created-at":"1722741576","app-deploy-source":"git-push","app-deploy-source-metadata":"f40f1652f8645835ca0813681ab4e8a6","app-dir":"/home/dokku/my-nice-app","app-locked":"false"}
josegonzalez commented 2 weeks ago

I think you mean app-name, which I don't know has ever been in the output. That said, should be easy enough to add

zachahn commented 2 weeks ago

Yeah, for some reason, a few of my apps show "app-deploy-source" and "app-deploy-source-metadata" as "my-app-name", but I was accidentally running a very old version of Dokku until pretty recently. 🤐

I figured out a workaround for my script! So I don't really need this feature request anymore. LMK if you'd like me to close it.

(Btw, thanks for your work on Dokku! I've been using it for a few years now, and I like using it.)