Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Sync to dist-git MR when source-git MR has been closed or reopened #62

Merged
softwarefactory-project-zuul merged 8 commits into packit:main from jpopelka:close-mr
May 10, 2022

Conversation

@jpopelka
Copy link
Member

@jpopelka jpopelka commented May 3, 2022
edited
Loading

This comment was marked as outdated.

jpopelka added a commit to jpopelka/packit-service that referenced this pull request May 6, 2022
I need this for hardly, where we want to react when a source-git MR gets closed.
packit/hardly#62 
@jpopelka jpopelka changed the title (削除) WIP: Sync to dist-git MR when source-git MR has been closed or reopened (削除ここまで) (追記) Sync to dist-git MR when source-git MR has been closed or reopened (追記ここまで) May 6, 2022
@jpopelka jpopelka marked this pull request as ready for review May 6, 2022 17:11

This comment was marked as outdated.

jpopelka added a commit to jpopelka/packit-service that referenced this pull request May 9, 2022
I need this for hardly, where we want to react when a source-git MR gets closed.
packit/hardly#62 
jpopelka added a commit to jpopelka/packit-service that referenced this pull request May 9, 2022
I need this for hardly, where we want to react when a source-git MR gets closed.
packit/hardly#62 
jpopelka added a commit to jpopelka/packit-service that referenced this pull request May 9, 2022
I need this for hardly, where we want to react when a source-git MR gets closed.
packit/hardly#62 

This comment was marked as outdated.

jpopelka added a commit to jpopelka/packit-service that referenced this pull request May 9, 2022
I need this for hardly, where we want to react when a source-git MR gets closed.
packit/hardly#62 
Comment on lines 127 to 138
if (
self.target_repo_branch
not in self.packit.dg.local_project.git_project.get_branches()
):
msg = f"Downstream {self.target_repo}:{self.target_repo_branch} branch does not exist."
self.project.get_pr(int(self.mr_identifier)).comment(msg)
logger.info(msg)
return TaskResults(success=True)
Copy link
Member

@TomasTomecek TomasTomecek May 9, 2022

Choose a reason for hiding this comment

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

We should probably put more text in the comment to guide contributors/maintainers.

Copy link
Member Author

@jpopelka jpopelka May 9, 2022

Choose a reason for hiding this comment

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

This was added in #56 and I don't think it'll happen too often because the source-git branches should in general match dist-git branches. But I tried to add more context to the message. Check the latest commit.

logger.error(f"Unknown action {self.action}")
return TaskResults(success=False)
logger.info(msg)
self.dist_git_pr.comment(msg)
Copy link
Member

@TomasTomecek TomasTomecek May 9, 2022

Choose a reason for hiding this comment

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

I hope folks won't find this as spamming but it's totally significant to inform about such an action in the downstream PR.

Copy link
Member Author

@jpopelka jpopelka May 9, 2022

Choose a reason for hiding this comment

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

Yes, and in most cases, you close the source-git MR only once, so it's just one comment.

jpopelka added a commit to jpopelka/packit-service that referenced this pull request May 9, 2022
I need this for hardly, where we want to react when a source-git MR gets closed.
packit/hardly#62 
Copy link
Contributor

Build succeeded.

✔️ pre-commit SUCCESS in 1m 40s
✔️ hardly-tests SUCCESS in 3m 18s

Comment on lines +132 to +134
"Can't create a dist-git pull/merge request out of this contribution "
f"because matching {self.target_repo_branch} branch does not exist "
f"in dist-git {self.target_repo} repo."
Copy link
Member

@TomasTomecek TomasTomecek May 9, 2022

Choose a reason for hiding this comment

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

Thanks!

jpopelka added a commit to jpopelka/packit-service that referenced this pull request May 10, 2022
I need this for hardly, where we want to react when a source-git MR gets closed.
packit/hardly#62 
@jpopelka jpopelka added the mergeit When set, zuul wil gate and merge the PR. label May 10, 2022
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ pre-commit SUCCESS in 1m 39s

@jpopelka jpopelka deleted the close-mr branch May 10, 2022 10:29
softwarefactory-project-zuul bot added a commit that referenced this pull request May 18, 2022
Improve code added in #62
I initially wanted to attach these refactoring commits to some other PR, but I think they'll be better on their own.
Reviewed-by: None <None>
Reviewed-by: Jiri Popelka <None>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer

@TomasTomecek TomasTomecek TomasTomecek approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

mergeit When set, zuul wil gate and merge the PR.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /