Oh, my. This is a long line. Bohdan, can you break it into multiple lines to make it readable?
1 new commit added
Split line in _comment_matching
A general comment: Bohdan, can you make this work for both github and pagure upstreams? I'd like to maintain parity/symmetry between them.
github
pagure
@ralph yes. But I need to test it on something, do you have repository on pagure and component on jira on which I can test it?
jira
Hm, how about this sync-to-jira repo? You could sync it to the FACTORY project in stage jira.
Added support comment sync for pagure
@ralph I added comment adding for pagure, but not case if comment will change, because pagure doesn't return previous text of comment. Thus I can't compare it. It gives only id, which is useless.
id
This should probably use _comment_format.
_comment_format
Personally, I think the multiple use of lambda makes this code kind of hard to read. I wonder if using nested for-loops with if-statements would make it a bit better.
lambda
Let's remove print statements.
print
Seems unrelated.
Made jira and github/pagure comments intersection more understandable, return logging level to previous value and remove print
This looks reasonable to me. @ralph wdyt? We probably want test coverage on the new code.
What does j stand for?
j
Can we change this to the following please? :bike: :house:
return "Upstream, %s wrote:\n\n{quote}\n%s\n{quote}" % (comment['author'], comment['body'])
This looks reasonable to me. @ralph wdyt?
Agreed. It is looking good. Almost there!
We probably want test coverage on the new code.
Agreed here also - @biakymet, can you add tests to match?
What's going on in this line?
Also here, it looks like you removed the definition of find without replacing it here.
find
I fixed a few mocks, got tox passing again, and pushed those commits to a comments-sync branch on the main repo. @biakymet, you should pull from there to update this PR.
tox
comments-sync
There are other issues here that need to be resolved before this can be merged.
5 new commits added
Merge branch 'comments-sync' of https://pagure.io/sync-to-jira into comments-sync
Bring mocks in line with latest comment sync changes.
PEP8 futzing.
Remove print statement.
Updating comment, in case if it was changed on upstream.
Oh, I see - this is a keyword argument. The spaces made me think it was an erroneous assignment.
@biakymet, you may want to rebase on develop, after #58 was merged.
develop
rebased onto 5516d499cdcf5162ddcb40da61729d8703ad228f
@ralph done, please, review.
OK, this looks good now (with one tweak which I'll make). I'm going to merge it but won't roll it out until next week.
Pull-Request has been closed by ralph