TypeError: string indices must be integers
Opened this issue · 0 comments
Alex-ley-scrub commented
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](https://private-user-images.githubusercontent.com/94057608/285006937-dd161c54-4c20-49fb-9e71-841776b22b89.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4MjM2MjEsIm5iZiI6MTcyNTgyMzMyMSwicGF0aCI6Ii85NDA1NzYwOC8yODUwMDY5MzctZGQxNjFjNTQtNGMyMC00OWZiLTllNzEtODQxNzc2YjIyYjg5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA4VDE5MjIwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIzYWRkN2QwZjk2MzhkMzk5ZTJhNTI4YTgxODlhNDA1NjM1MWZiZjA3MzJiZGNjM2JhY2QxMzFjZWIyOGY0MjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.sG6TfL4nualFDjBnrBPvtxEJNLUUJMGHAN5kREqVfBM)