How to find which is the review board site directory from inside my extension

27 views
Skip to first unread message

Kartik

unread,
Sep 7, 2025, 2:48:28 PMSep 7
to Review Board Community
Hello,
I am trying my hand at writing an extension that uses signal hooks (e.g. on_review_published) to update the jira ticket with the progress of the code review. I would like to read the jira server access info from a settings file, and the site directory (default: /var/www/reviewboard) is a good place for that file. Rather than hard-coding the path, I'd like to find what is the site directory folder, and look in there. 
My question is: How can I find which is the site directory folder from inside my extension? 
Thanks!
Kartik

David Trowbridge

unread,
Sep 9, 2025, 11:45:07 AMSep 9
to revie...@googlegroups.com
Kartik,

Instead of storing your configuration in a file, I'd suggest providing a settings form. Any data saved by the form will get serialized to JSON and stored in the database, and then they'll be available in decoded form in `extension.settings`


Apologies for the current state of the extensions documentation--we're working on improving it.

David

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/reviewboard/4c2e56bb-35c9-48e3-b9f4-81f5e8008251n%40googlegroups.com.

Kartik

unread,
Sep 9, 2025, 12:17:47 PMSep 9
to Review Board Community
David, 
Thank you for your response. The JIRA access information is going to come to us as a file -- it is not something that a user is going to type in. At most, the location of the file is something the user can input into a settings form. Creating a form to type in just that info seems to be a lot, especially given my limited abilities and bandwidth. So finding the site directory from inside the extension remains the most feasible option we have. 

The Extensions feature that you have, that enables a user to customize RB for their team's needs is very impressive and powerful. Thank you!

Kartik

Kartik

unread,
Sep 12, 2025, 11:17:48 AMSep 12
to Review Board Community
David, 

Well, we cannot get away from reading a file from disk. And the site directory seems a good place for it. So... is there a way to find what the site directory is, from inside an extension? 

Thanks again
Kartik
Reply all
Reply to author
Forward
0 new messages