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

SearchIssues related testing and refactoring #121

Merged

Conversation

k2tzumi
Copy link
Contributor

@k2tzumi k2tzumi commented Oct 2, 2022

Motivation for creating PR

The following error occurred in the tagpr workflow
https://github.com/k2tzumi/runn/actions/runs/3166757995/jobs/5156706551#step:3:303

I wrote a verification code to investigate the cause.

Revision details

  • make testable
  • Append test

tagpr_test.go Outdated
def3db8
c0fc143
`,
"repo:k2tzumi/runn is:pr is:closed 1a8bb97 1b7691b a9462b9 4d2b5e9 9ce4268 1eccbf8 1c3fbfc 968ade5 531c782 780bb71 6025fbf cc369ba a1f3e39 792bc85 3e3c4e1 37832de ac97702 d742186 217eb5d 0f900f7 5ef33d1 1d2ec15 2f37752 066ad7b 2e19b14 52b3706 f5134ae ea39bbf 76b0630 ee3c6e6 2336be4 423a209 63caa74",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Expected value at failure.

The correct number of characters was within 256 bytes.
https://github.com/k2tzumi/tagpr/actions/runs/3167204019/jobs/5157515466#step:4:30

Copy link
Contributor Author

Choose a reason for hiding this comment

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

e6111b9

I mistakenly thought you were truncating the commit log.

@k2tzumi k2tzumi force-pushed the fix-validation-failed-when-getting-issue branch from e42fb98 to c954883 Compare October 3, 2022 11:35
query += " " + sha
}
if query != queryBase {
for _, query := range buildChunkSearchIssuesQuery(queryBase, shasStr) {
Copy link
Owner

Choose a reason for hiding this comment

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

Using range is very smart!

tagpr.go Outdated
chunkQueries = append(chunkQueries, query)
query = queryBase

continue
Copy link
Owner

@Songmu Songmu Oct 3, 2022

Choose a reason for hiding this comment

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

You shouldn't continue here. Current sha should be appended to the query.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you.
I fixed it 2f52564

@Songmu
Copy link
Owner

Songmu commented Oct 3, 2022

Good job. Thank you.

@Songmu Songmu merged commit e7c16fe into Songmu:main Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants