project Websites / Gitlab Issue Listing Script avatar

websites/Gitlab-Issue-Listing-Script#37: Issue page may break with "Commit Not Found" when project filtering active

Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.4
Created: 23-Apr-22 09:37


When project filtering and enhanced commits are active, for example

    public $enforce_explicit_limits = true;
    public $permitted_projects = array(

    public $enhanced_commit_notifications = true;

Issue pages may break if they contain a commit notification from a project not included in $permitted_projects.

Issue Links

Toggle State Changes


assigned to @btasker

In hindsight, this was an obvious outcome...

When enhanced commit notifications are active, for each commit notification we detect we call getCommit()

However, like most other methods, that applies project filters

    function getCommit($proj_path, $commit_h){
        global $config;

        if (!$this->enforceProjectFilters($proj_path)){
            echo "Commit Not found";

Which results in our page being killed

We can add a variable to the signature that allows us to disable that check, but we'll then fail at a later stage (as getCommit() calls getProject()) so we need to pass that on through


mentioned in commit f10dd163620f519494ff17f674c77af154034f4b

Commit: f10dd163620f519494ff17f674c77af154034f4b 
Author: B Tasker                            
Date: 2022-04-23T10:46:06.000+01:00 


Add internal variable $enforce_filters for websites/Gitlab-Issue-Listing-Script#37

This allows us to conditionally turn off project filtering when necessary - for example, to ensure that we can still display enhanced commit notifications even if the referencing commit isn't in a project in the permitted list

+8 -7 (15 lines changed)

marked this issue as related to #30