shahar1 commented on issue #60836: URL: https://github.com/apache/airflow/issues/60836#issuecomment-3783004698
> Hi [@shahar1](https://github.com/shahar1), > > Since the original author has mentioned they are no longer willing to open a PR, I would like to take up this issue and work on it. > > My planned approach is as follows: > > 1. Extend the internal `_list_mail_ids_desc` method to accept an optional `max_mails: int | None` parameter, limiting the number of latest matching emails while preserving the current default behavior when `None`. > 2. Propagate the `max_mails` parameter to relevant ImapHook public methods that retrieve emails or attachments (e.g., `retrieve_mail_attachments`, `download_mail_attachments`, etc.). > 3. Ensure backward compatibility: > > * Default value will be `None` > * Existing behavior remains unchanged when the parameter is not provided > 4. Add unit tests to validate: > > * All attachments are retrieved from the last N emails > * Behavior remains unchanged when `max_mails` is not set > * Interaction with `latest_only=True` > 5. Update docstrings and method signatures where applicable. > > I’m comfortable working within the providers/imap codebase and following Airflow’s contribution and testing guidelines. > > Please let me know if I can be assigned to this issue. > > Thanks! Thanks for the detailed suggestion, but as were other 3 commenters in line - I first want to give them the opportunity by order. In the meanwhile - you may work on other issues labeled as `good first issue`, review their PR once done, or wait in line if all previous commenters don't make it. @sarth-akvaish if you're interested to be assigned, please comment within the day (otherwise it I'll suggest it to the next commenter). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
