Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert PR sync for gitlab #461

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Revert PR sync for gitlab #461

merged 2 commits into from
Jul 3, 2024

Conversation

adnanhashmi09
Copy link
Contributor

Linked Issue(s)

Closes #460

Proposed Changes

A service module to sync gitlab revert prs. This will be called by the gitlab sync service which will be later implemented. Tests are also written for the same service.

if pr.state != PullRequestState.MERGED:
continue

pr_merge_hash_match_strings.append(f"revert-{pr.merge_commit_sha[:8]}")
Copy link
Contributor

Choose a reason for hiding this comment

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

is this pattern for revert pr branch names always true ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep

"""
revert_pr_hashes: List[str] = []
repo_ids: Set[str] = set()
repo_id_to_pr_merge_hash_to_id_map: Dict[str, Dict[str, str]] = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

repo_id_to_pr_merge_hash_to_revert_pr_id_map would make this more readable as this code is already kind of complex

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, makes sense. Made the changes. Thanks for the suggestion.

@adnanhashmi09 adnanhashmi09 merged commit 765c3d8 into main Jul 3, 2024
3 checks passed
@adnanhashmi09 adnanhashmi09 deleted the gitlab-repo-sync branch July 3, 2024 05:36
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.

Create revert pr sync for gitlab to map incidents
2 participants