[Enhancement]: Add commit hash to server page #1948

Open
opened 2026-04-25 00:01:41 +02:00 by adam · 3 comments
Owner

Originally created by @nichwall on GitHub (May 5, 2024).

Describe the feature/enhancement

Adding the commit hash to the server settings page would be handy for issues reported by users on :edge. Something similar to how Mealie does it would be good (pictured below).

Then, there can just be a text box in the issue template for the hash to be pasted into if the reporter is not using a release.

Mealie Commit Hash

Originally created by @nichwall on GitHub (May 5, 2024). ### Describe the feature/enhancement Adding the commit hash to the server settings page would be handy for issues reported by users on `:edge`. Something similar to how Mealie does it would be good (pictured below). Then, there can just be a text box in the issue template for the hash to be pasted into if the reporter is not using a release. ![Mealie Commit Hash](https://github.com/advplyr/audiobookshelf/assets/5686638/8df223dd-221a-4cec-ac24-65607b1ca440)
adam added the enhancement label 2026-04-25 00:01:41 +02:00
Author
Owner

@advplyr commented on GitHub (May 5, 2024):

Are they building on every commit? We might be able to pass something through from the gh action to the Docker file

@advplyr commented on GitHub (May 5, 2024): Are they building on every commit? We might be able to pass something through from the gh action to the Docker file
Author
Owner

@nichwall commented on GitHub (May 5, 2024):

I'm not sure. I think it is built on every commit and it just passed through. Those commit hashes match up to commits in GH but I'm not updating on every commit and haven't paid enough attention to when it changes. (Referring to Mealie)

@nichwall commented on GitHub (May 5, 2024): I'm not sure. I think it is built on every commit and it just passed through. Those commit hashes match up to commits in GH but I'm not updating on every commit and haven't paid enough attention to when it changes. (Referring to Mealie)
Author
Owner

@nichwall commented on GitHub (May 6, 2024):

After additional research, we can use GITHUB_SHA in a workflow to get the commit hash of the commit that triggers the workflow. https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables

It looks like Mealie just uses an internal environment variable for this.
https://github.com/mealie-recipes/mealie/blob/dabd93c91915c7531686bebe29634d28ab456275/mealie/core/settings/settings.py#L56

Another option is overwriting the value in a "constants" file during the workflow so any build images will use the SHA. Not sure how to also do that when building from source (outside of workflow), but if building from source the user would be able to get the hash from their local repo.

@nichwall commented on GitHub (May 6, 2024): After additional research, we can use `GITHUB_SHA` in a workflow to get the commit hash of the commit that triggers the workflow. https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables It looks like Mealie just uses an internal environment variable for this. https://github.com/mealie-recipes/mealie/blob/dabd93c91915c7531686bebe29634d28ab456275/mealie/core/settings/settings.py#L56 Another option is overwriting the value in a "constants" file during the workflow so any build images will use the SHA. Not sure how to also do that when building from source (outside of workflow), but if building from source the user would be able to get the hash from their local repo.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1948