Wiki: ConfigurationFile/Websites / Gitlab Issue Listing Script



The GILS configuration file is relatively simple, it's used to provide the script with credentials to use when accessing Gitlab, as well as to constrain which projects are returned

<?php

class GILSConfig {

    public $server = "<your gitlab url>";
    public $access_token = "<your token>";


    // Override any URLs to use HTTPS
    // useful if GL is behind a reverse proxy
    public $force_https = true;

    // Should we only list projects marked as public?
    public $public_projects_only = false;

    /* If set, then only the projects detailed in permitted_projects will be allowed
     * to be displayed
     * 
     */
    public $enforce_explicit_limits = false;


    /* Should enhanced commit  information be displayed in issues?
     * 
     * Warning: this can increase latency, if you want it enabled
     * you probably also want to configure redis
     * 
     */
    public $enhanced_commit_notifications = true;

    /* What text does gitlab use in commit notifications?
     * 
     * Should only need changing if you're using a non-english language
     * 
     * 
     */
    public $commit_mention_text = "mentioned in commit";


    /* This should be populated with url format project group and name
     * 
     * e.g.: websites/Gitlab-Issue-Listing-Script
     */
    public $permitted_projects = array('websites/Gitlab-Issue-Listing-Script');    

    /* Urls specified here will be embedded into the head of pages
     * 
     */
    public $include_head = array(
            "scripts" => array(),
            "stylesheets" => array()        
    );

    /** Array of group names
     * 
     * Any project falling into one of these groups won't be listed on the
     * homepage.
     * 
     * They'll still be accessible if linked to from another project
     */
    public $excluded_groups_from_homepage = array('Github Mirror');



    /** Redis config
    *
    * Redis can be used to cache API responses
    * this can significantly improve response time
    *
    */
    public $redis_enabled = true;
    public $redis_host = 'docker-host';
    public $redis_port = 6379;

    // Set this to your redis password if enabled
    public $redis_pass = false;

    // Number of seconds an item in redis is valid for
    public $redis_ttl = 300;

}

This file needs to end up at /var/www/html/config/config.php - if GILS is being run via Docker (the usual method) then it can be named anything on the host and exported to that location