InnerSourcePatterns icon indicating copy to clipboard operation
InnerSourcePatterns copied to clipboard

I18n check: fix empty comment

Open spier opened this issue 2 years ago • 3 comments

I noticed a bug in .github/workflows/i18n-consistency-checker.yaml. When it runs but doesn't find any issues, it will still create a comment to the existing GitHub issue. Example: https://github.com/InnerSourceCommons/InnerSourcePatterns/issues/583#issuecomment-1701941780

This happened because the script wrote a header to issue.md, and later one the existence of the issue.md file was used to confirm whether an issue/comment should be created or not. As the header always exists, this was always true.

I fixes this by breaking up the logic into two main blocks: a) check for inconsistencies between en and translation b) if inconsistencies were found, create issue/comment

I am sure that my solution could be greatly improved with some more shell scripting knowledge. Personally I am not super happy with my introduction of yet another file (issue-full.md). This could have likely been done differently as well.

Looking forward to any input.

spier avatar Sep 01 '23 10:09 spier

@yuhattor I left this in draft because I think the code can be improved.

Also I found it a bit hard to test it end-to-end. I did some basic simulations but cannot say that I am 100% confident that this works as expected.

spier avatar Sep 01 '23 10:09 spier

@yuhattor would be great if you could help me check this PR.

spier avatar Nov 18 '23 21:11 spier

@spier Thank you for the PR and sorry for the delay!! I haven't looked at this for a long time, and I've forgotten a bit about the implementation of this codebase. I am forking it and checking it out. Give me a little time.

yuhattor avatar Dec 06 '23 09:12 yuhattor