Dashboard MR Linker
An AWS Lambda function that posts internal notes on newly opened GitLab merge requests linking to the Hummingbird dashboard status page. This provides an easy way for developers to check Konflux build status directly from their MRs.
Features
- Internal Notes: Posts an internal note with dashboard link when MRs are opened (visible to project members only)
- Configurable Projects: Only monitors specified projects via space-delimited list
- SNS Integration: Subscribes to GitLab events via SNS with filter policy
Architecture
The Lambda subscribes to the existing SNS topic (from gitlab-event-forwarder)
with a filter for merge_request events:
GitLab Webhook → gitlab-event-forwarder → SNS Topic → dashboard-mr-linker → GitLab API
When a new MR is opened on a configured repository, the Lambda posts an internal note:
:robot: **Hummingbird Status**
View Konflux build status for this MR: [org/group/repo!123](https://dashboard.example.com/mr/org/group/repo/123)
Prerequisites
- AWS CLI configured with appropriate credentials (IAM permissions for Lambda, SNS, CloudFormation, CloudWatch Logs)
- Podman or Docker (for containerized SAM build/deploy)
- Python 3.11 or later (for development)
- GitLab API token with
apiscope (Reporter role or higher on monitored projects)
Deployment
Build and deploy using containerized AWS SAM CLI:
cd dashboard-mr-linker
make build # Build Lambda package
make deploy # First deployment (interactive/guided)
make redeploy # Subsequent deployments (non-interactive)
Parameters
| Parameter | Description | Default |
|---|---|---|
ResourcePrefix |
Prefix for resources | myapp-prod |
SnsTopicArn |
SNS topic ARN | (required) |
GitLabToken |
GitLab API token (api scope, Reporter+) |
(required) |
GitLabUrl |
GitLab instance URL | https://gitlab.com |
DashboardBaseUrl |
Base URL of the dashboard | (required) |
GitLabProjects |
Space-delimited list of GitLab project paths | (required) |
SentryDsn |
Optional Sentry DSN | `` |
Resource naming: Lambda follows {ResourcePrefix}-lambda-linker pattern.
Prerequisites: Requires an existing SNS topic. Deploy
hummingbird-events-topic first to create the topic, then use its
ARN for the SnsTopicArn parameter.
Usage
Configure the GITLAB_PROJECTS parameter with space-delimited project paths:
org/group/containers org/group/rpms org/other/project
Only MRs opened on these projects will receive dashboard link notes.
Development
See the main README for development workflows.
make setup # Install dependencies
make check # Lint code (ruff)
make fmt # Format code
make test # Run unit tests
make coverage # Run tests with coverage
Configuration
Lambda function receives configuration via environment variables (automatically set by CloudFormation):
| Variable | Description |
|---|---|
GITLAB_TOKEN |
GitLab API token (api scope, Reporter+) |
GITLAB_URL |
GitLab instance URL |
DASHBOARD_BASE_URL |
Base URL of the dashboard |
GITLAB_PROJECTS |
Space-delimited list of GitLab project paths |
SENTRY_DSN |
Optional Sentry DSN |
AWS_REGION |
AWS region (auto-set) |
Security & Limitations
Security:
- GitLab API token should have minimal required scopes (
api) - Token stored as CloudFormation parameter with
NoEcho: true - SNS subscription uses filter policy to only receive relevant events
- Notes are posted as internal (visible to project members only)
- CloudWatch logs capture all note posts (7-day retention)
- Sentry integration for error tracking
Limitations:
- Lambda timeout: 30 seconds
- Lambda memory: 256 MB
- Only processes
action: openevents (not updates or other actions)
License
This project is licensed under the GNU General Public License v3.0 or later - see the LICENSE file for details.