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

Automatically convert todo comments in code to the issues #1610

Closed
13 tasks done
php-coder opened this issue Jun 12, 2023 · 1 comment
Closed
13 tasks done

Automatically convert todo comments in code to the issues #1610

php-coder opened this issue Jun 12, 2023 · 1 comment
Assignees
Labels
ADR/needed A decision has been made and it needs to be documented area/ci techdebt
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented Jun 12, 2023

Follow-up to: #1595

Currently I'm investigating the idea to supply a similar automation by myself:

Checklist:

  • Generate pdd.xml
  • Generate todos-in-code.tsv
  • Generate a mapping between puzzles ids and existing issues
  • Deal with incorrect comments (with trailing --> or */)
  • Create new issues for todos without mapping
  • Cleanup
    • remove gh1595_extract_todos branch
    • remove generated-todos-test branch
  • Document
    • put a workaround for pdd/wiremock back
    • create pdd-xml-to-json.sh as pdd doesn't support JSON output (+pdd issue)
    • modify comments to avoid having next lines in a title
    • workaround: 2 search queries because github doesn't support OR
    • workaround: possible collisions because GitHub doesn't support exatch match
    • pdd: workaround for trailing --> (pdd gh111)
@php-coder php-coder added this to the 0.4.7 milestone Jun 12, 2023
@php-coder php-coder self-assigned this Jun 12, 2023
php-coder added a commit that referenced this issue Jun 12, 2023
php-coder added a commit that referenced this issue Jun 13, 2023
Should be in commit 597aabf

Relate to #1610
php-coder added a commit that referenced this issue Jun 16, 2023
php-coder added a commit that referenced this issue Jun 16, 2023
php-coder added a commit that referenced this issue Jun 16, 2023
php-coder added a commit that referenced this issue Jun 16, 2023
php-coder added a commit that referenced this issue Jun 17, 2023
php-coder added a commit that referenced this issue Jun 22, 2023
php-coder added a commit that referenced this issue Jun 22, 2023
php-coder added a commit that referenced this issue Jun 22, 2023
The comment has been modified in 947f7b2 commit

Part of #1610
php-coder added a commit that referenced this issue Jun 22, 2023
The comment has been modified in 947f7b2 commit

The error was:
ERROR: 684-0b0d5497 => #748: issue looks identical but its body doesn't contain the puzzle id (684-0b0d5497)!
ERROR: Perhaps, the puzzle id got changed after issue creation
ERROR: Body: The puzzle 684-b075a77e (from #684) in [src/main/java/ru/mystamps/web/service/SeriesImportServiceImpl.java](https://github.com/php-coder/mystamps/blob/6091f30a29dc445f8f544cc05e359df910c67eb5/src/main/java/ru/mystamps/web/service/SeriesImportServiceImpl.java#L182-L183) has to be resolved: "Series import: add integration test for the case when parsed value don't match database"  https://github.com/php-coder/mystamps/blob/6091f30a29dc445f8f544cc05e359df910c67eb5/src/main/java/ru/mystamps/web/service/SeriesImportServiceImpl.java#L182-L183  The puzzle was created by Slava Semushin on 04-Dec-17
ERROR: Ways to resolve:
ERROR:     1) edit #748 and modify its body to contain 684-0b0d5497
ERROR:     2) manually create a mapping between this puzzle and the issue:
ERROR:        echo '684-0b0d5497\t748\topen\tmanually' >>generated-todos/todos-on-github.tsv

Part of #1610
php-coder added a commit that referenced this issue Jun 23, 2023
php-coder added a commit that referenced this issue Jun 25, 2023
php-coder added a commit that referenced this issue Jun 25, 2023
php-coder added a commit that referenced this issue Jun 25, 2023
php-coder added a commit that referenced this issue Jun 25, 2023
php-coder added a commit that referenced this issue Jun 25, 2023
Correction for 582cfb3 commit.

Part of #1610
php-coder added a commit that referenced this issue Jun 25, 2023
Correction for 582cfb3 commit.

Part of #1610
php-coder added a commit that referenced this issue Jun 25, 2023
php-coder added a commit that referenced this issue Jun 25, 2023
php-coder added a commit that referenced this issue Jun 25, 2023
php-coder added a commit that referenced this issue Jun 26, 2023
src/main/scripts/ci/connect-todos-to-issues.sh:44:8: warning: Declare and assign separately to avoid masking return values. [SC2155]
src/main/scripts/ci/connect-todos-to-issues.sh:60:21: note: Expressions don't expand in single quotes, use double quotes for that. [SC2016]
src/main/scripts/ci/connect-todos-to-issues.sh:83:17: note: read without -r will mangle backslashes. [SC2162]
src/main/scripts/ci/connect-todos-to-issues.sh:83:32: warning: TICKET appears unused. Verify use (or export if used externally). [SC2034]
src/main/scripts/ci/connect-todos-to-issues.sh:84:19: note: Use $((..)) instead of deprecated $[..] [SC2007]
src/main/scripts/ci/connect-todos-to-issues.sh:90:38: note: Double quote to prevent globbing and word splitting. [SC2086]
src/main/scripts/ci/connect-todos-to-issues.sh:92:19: note: read without -r will mangle backslashes. [SC2162]
src/main/scripts/ci/connect-todos-to-issues.sh:92:24: warning: ID appears unused. Verify use (or export if used externally). [SC2034]
src/main/scripts/ci/connect-todos-to-issues.sh:131:18: note: echo may not expand escape sequences. Use printf. [SC2028]
src/main/scripts/ci/connect-todos-to-issues.sh:135:10: note: Double quote to prevent globbing and word splitting. [SC2086]
src/main/scripts/ci/connect-todos-to-issues.sh:144:36: note: read without -r will mangle backslashes. [SC2162]
src/main/scripts/ci/connect-todos-to-issues.sh:150:10: note: Double quote to prevent globbing and word splitting. [SC2086]
src/main/scripts/ci/connect-todos-to-issues.sh:153:19: note: read without -r will mangle backslashes. [SC2162]
src/main/scripts/ci/connect-todos-to-issues.sh:153:24: warning: SKIP_PUZZLE_ID appears unused. Verify use (or export if used externally). [SC2034]
src/main/scripts/ci/connect-todos-to-issues.sh:153:39: warning: ORIG_ISSUE appears unused. Verify use (or export if used externally). [SC2034]
src/main/scripts/ci/connect-todos-to-issues.sh:153:50: warning: SKIP_TITLE appears unused. Verify use (or export if used externally). [SC2034]
src/main/scripts/ci/connect-todos-to-issues.sh:153:61: warning: PUZZLE_FILE appears unused. Verify use (or export if used externally). [SC2034]
src/main/scripts/ci/connect-todos-to-issues.sh:156:17: note: read without -r will mangle backslashes. [SC2162]
src/main/scripts/ci/connect-todos-to-issues.sh:156:22: warning: PUZZLE_LINE_START appears unused. Verify use (or export if used externally). [SC2034]
src/main/scripts/ci/connect-todos-to-issues.sh:156:40: warning: PUZZLE_LINE_END appears unused. Verify use (or export if used externally). [SC2034]
src/main/scripts/ci/connect-todos-to-issues.sh:171:26: note: Use $((..)) instead of deprecated $[..] [SC2007]
src/main/scripts/ci/connect-todos-to-issues.sh:175:10: note: Double quote to prevent globbing and word splitting. [SC2086]

Part of #1610
php-coder added a commit that referenced this issue Jun 26, 2023
…ve initialized git env vars

Correction for 2263615 commit.

Part of #1610
php-coder added a commit that referenced this issue Jun 26, 2023
@php-coder php-coder added ADR/needed A decision has been made and it needs to be documented area/build scripts labels Jun 26, 2023
php-coder added a commit that referenced this issue Jun 26, 2023
php-coder added a commit that referenced this issue Jun 26, 2023
php-coder added a commit that referenced this issue Jun 26, 2023
php-coder added a commit that referenced this issue Jun 26, 2023
… added puzzles as it looked to the old file

Correction for d40f5ac commit.

Part of #1610
php-coder added a commit that referenced this issue Jun 27, 2023
php-coder added a commit that referenced this issue Jun 27, 2023
php-coder added a commit that referenced this issue Jun 27, 2023
php-coder added a commit that referenced this issue Jun 27, 2023
php-coder added a commit that referenced this issue Jun 28, 2023
Should be in c02dc39 commit.

Relate to #1610

[skip ci]
php-coder added a commit that referenced this issue Jun 28, 2023
php-coder added a commit that referenced this issue Jun 28, 2023
… added puzzles as the files weren't moved

Correction for a1bffa5 commit.

Relate to #1610
php-coder added a commit that referenced this issue Jun 28, 2023
php-coder added a commit that referenced this issue Jun 29, 2023
@php-coder
Copy link
Owner Author

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADR/needed A decision has been made and it needs to be documented area/ci techdebt
Projects
None yet
Development

No branches or pull requests

1 participant