octue/generate-pull-request-description

TypeError: string indices must be integers

Opened this issue · 0 comments

Bug report

About me

We are trying to use your GitHub action but it doesn't work exactly as needed at the minute - we could potentially submit PRs to fix this if you are open to that

What is the current behavior?

Action throws error:

Traceback (most recent call last):
  File "/usr/local/bin/generate-pull-request-description", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/generate_pull_request_description/generate_pull_request_description.py", line 459, in main
    ).generate()
  File "/usr/local/lib/python3.10/site-packages/generate_pull_request_description/generate_pull_request_description.py", line 116, in generate
    parsed_commits, unparsed_commits = self._parse_commit_messages_from_github()
  File "/usr/local/lib/python3.10/site-packages/generate_pull_request_description/generate_pull_request_description.py", line 249, in _parse_commit_messages_from_github
    header, *body = commit["commit"]["message"].split("\n")
TypeError: string indices must be integers

What is the expected behavior?

Not to throw the error

image