#50 Add comments synchronization for Github
Closed by ralph. Opened by biakymet.
biakymet/sync-to-jira comments-sync  into  develop

Download 50.patch
no initial comment

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.

@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?

Hm, how about this sync-to-jira repo? You could sync it to the FACTORY project in stage jira.

1 new commit added

  • 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.

This should probably use _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.

Let's remove print statements.

Seems unrelated.

1 new commit added

  • 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?

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.

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.

There are other issues here that need to be resolved before this can be merged.

  • New tests should be added specifically covering comments in the upstream, intermediary, and downstream test files.
  • The use of the find function in downstream.py is definitely broken.
  • Please update the text format of the comment as requested above.

5 new commits added

  • Merge branch 'comments-sync' of https://pagure.io/sync-to-jira into comments-sync
  • Made jira and github/pagure comments intersection more understandable, return logging level to previous value and remove print
  • Bring mocks in line with latest comment sync changes.
  • PEP8 futzing.
  • Remove print statement.

What's going on in this line?

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.

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

Metadata