Skip to content

Fix: Support numeric Bill IDs and switch deploy target to Oracle#47

Open
StatPan wants to merge 2 commits intomasterfrom
fix/issue-1-numeric-bill-id
Open

Fix: Support numeric Bill IDs and switch deploy target to Oracle#47
StatPan wants to merge 2 commits intomasterfrom
fix/issue-1-numeric-bill-id

Conversation

@StatPan
Copy link
Copy Markdown
Owner

@StatPan StatPan commented Dec 12, 2025

Changes

  1. Fix in BillService:
    • Removed the check that skipped searching for numeric Bill IDs (BILL_NO).
    • Now get_bill_details attempts to search via get_bill_info first for all IDs, ensuring metadata (Bill Name, Proposer, etc.) is retrieved even for numeric IDs like '2208712'.
  2. CI Update:
    • Updated the deployment trigger in deploy.yml to use event type deploy-assemblymcp-oracle, targeting the Oracle infrastructure instead of Cloud Run.

Issue

  • Closes #1

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @StatPan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the BillService by introducing robust support for numeric Bill IDs, ensuring that all bill details and associated metadata are consistently retrieved regardless of the ID format. This resolves a previous limitation where numeric IDs were not fully processed. Concurrently, the deployment strategy has been updated to shift the target environment from Cloud Run to Oracle infrastructure, reflecting a change in the project's operational setup.

Highlights

  • Bill ID Handling: The BillService has been updated to correctly process numeric Bill IDs. Previously, these IDs were skipped, but now get_bill_details uses get_bill_info to retrieve full metadata for all ID types, including numeric ones.
  • Deployment Target Switch: The CI/CD pipeline in deploy.yml has been reconfigured to target Oracle infrastructure using the deploy-assemblymcp-oracle event type, moving away from Cloud Run.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/deploy.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly implements support for numeric Bill IDs by updating get_bill_info to differentiate between BILL_ID and BILL_NO. The get_bill_details function is also simplified as a result. The changes are logical and improve the service's functionality. I've added one comment to make the new ID handling logic in get_bill_info more robust by accounting for potential whitespace in the bill_id input.

Comment on lines +264 to +269
if bill_id:
# Check if bill_id is numeric (likely a BILL_NO)
if bill_id.isdigit():
params["BILL_NO"] = bill_id
else:
params["BILL_ID"] = bill_id
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current logic for determining if a bill_id is numeric doesn't account for leading/trailing whitespace. A bill_id like ' 12345 ' would fail the isdigit() check and be incorrectly treated as an alphanumeric BILL_ID. It's better to strip whitespace from bill_id before checking if it's numeric to handle such cases correctly. The logic can also be made more concise.

Suggested change
if bill_id:
# Check if bill_id is numeric (likely a BILL_NO)
if bill_id.isdigit():
params["BILL_NO"] = bill_id
else:
params["BILL_ID"] = bill_id
if bill_id:
stripped_id = bill_id.strip()
if stripped_id:
# Check if bill_id is numeric (likely a BILL_NO)
key = "BILL_NO" if stripped_id.isdigit() else "BILL_ID"
params[key] = stripped_id

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.

1 participant