mirror of
https://github.com/awslabs/iam-policy-autopilot.git
synced 2026-04-26 00:15:57 +03:00
[PR #97] [MERGED] refactor: consolidate waiter and paginator structs #231
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/iam-policy-autopilot#231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/awslabs/iam-policy-autopilot/pull/97
Author: @adpaco-aws
Created: 1/12/2026
Status: ✅ Merged
Merged: 1/20/2026
Merged by: @adpaco-aws
Base:
main← Head:refactor-extraction-structs📝 Commits (8)
7bd5ecfrefactor: consolidate waiter and paginator structs1ad520aMerge branch 'main' into refactor-extraction-structs1ff9fc6Merge branch 'main' into refactor-extraction-structsd32540bresolve outstanding merge issues9924560few more fixes (fmt, etc.)509f837clippy fixes + leftover struct46041ecchange viz topub(crate)on structs4f7142amakepub(crate) usetoo📊 Changes
7 files changed (+201 additions, -264 deletions)
View changed files
📝
iam-policy-autopilot-policy-generation/src/extraction/go/paginator_extractor.rs(+27 -49)📝
iam-policy-autopilot-policy-generation/src/extraction/go/waiter_extractor.rs(+25 -67)📝
iam-policy-autopilot-policy-generation/src/extraction/mod.rs(+1 -0)📝
iam-policy-autopilot-policy-generation/src/extraction/python/paginator_extractor.rs(+30 -73)📝
iam-policy-autopilot-policy-generation/src/extraction/python/waiters_extractor.rs(+24 -75)➕
iam-policy-autopilot-policy-generation/src/extraction/shared/extraction_utils.rs(+91 -0)➕
iam-policy-autopilot-policy-generation/src/extraction/shared/mod.rs(+3 -0)📄 Description
Issue #, if available: N/A
Description of changes: Consolidated waiter and paginator extraction structs from Python and Go extractors into a unified shared module. This eliminates code duplication and creates a consistent API across languages.
As part of this refactoring, we have replaced line-related fields with
start_positionandend_positiontuple fields for better precision. I noticed that we could go even further and haveWaiterCreationInfoandPaginatorCreationInfobecome a single structUtilityCreationInfobut I decided against it to have the code be clearer about what it's doing.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.