Skip to content

Add loyalty promo feature - #1

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
demo/loyalty-promo-1
Open

github-actions[bot] wants to merge 1 commit into
mainfrom
demo/loyalty-promo-1

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Add loyalty promo feature

This PR adds a promo.py module that rewards repeat customers.

🧪 Demo note: this code was generated by the Introduce code quality
issues
workflow and intentionally contains a few problems so you can see
how Code Quality (CodeQL) reacts. Look for:

  • an unused local variable and an always-true comparison (CodeQL)

Comment thread pizzeria/promo.py

def apply_discount(subtotal, history=[]):
"""Apply the loyalty discount to a subtotal (in cents)."""
history.append(subtotal)
Comment thread pizzeria/promo.py
discount_rate = 0.1
unused_tax = subtotal * 0.07

if subtotal == subtotal:
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: Python

Python / code-coverage/pytest

The overall line coverage in commit d1906b6 in the demo/loyalty-promo-1 branch is 67%. The line coverage in commit 681f5ca in the main branch is 89%.

Show a line coverage summary of the most impacted files.
File main 681f5ca demo/loyalty-promo-1 d1906b6 +/-
promo.py 0% 0% 0%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants