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

Trying to generate a change log results in an AttributeError. #4

Open
dsully opened this issue May 3, 2019 · 10 comments
Open

Trying to generate a change log results in an AttributeError. #4

dsully opened this issue May 3, 2019 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@dsully
Copy link

dsully commented May 3, 2019

$ git-changelog -t keepachangelog .
Traceback (most recent call last):
  File "/Users/dsully/.local/bin/git-changelog", line 10, in <module>
    sys.exit(main())
  File "/Users/dsully/.local/lib/python3.7/site-packages/git_changelog/cli.py", line 91, in main
    changelog = Changelog(args.repository, style=args.style)
  File "/Users/dsully/.local/lib/python3.7/site-packages/git_changelog/build.py", line 179, in __init__
    versions = self.group_commits_by_version(dates)
  File "/Users/dsully/.local/lib/python3.7/site-packages/git_changelog/build.py", line 284, in group_commits_by_version
    version.url = self.provider.get_tag_url(tag=commit.version)
AttributeError: 'NoneType' object has no attribute 'get_tag_url'
@pawamoy pawamoy self-assigned this May 3, 2019
@pawamoy
Copy link
Owner

pawamoy commented May 6, 2019

Thank you @dsully for taking the time to report this. Hopefully I'll finally have some time tomorrow to fix that 🙂

@pawamoy
Copy link
Owner

pawamoy commented May 7, 2019

Can you link to the project causing this issue? I'm particularly interested in the output of this comand: git config --get remote.origin.url which is used to get the provider URL (github.com, gitlab.com, etc.). Also currently it will only work for GitHub and GitLab 😅

@dsully
Copy link
Author

dsully commented May 7, 2019

It points to an internally hosted URL at my company, that happens to be Gerrit.

So it sounds like another provider would need to be implemented.

@pawamoy
Copy link
Owner

pawamoy commented May 7, 2019

Yep, exactly. This project is still very young, I'm not sure what would be the best way to quickly give users the ability to use it with other providers. Either we add support directly in the code, or we make a plugin architecture.

@dsully
Copy link
Author

dsully commented May 7, 2019

I would suggest a plugin architecture. With Python 3's __init_subclass__ it's pretty easy to do.

@pawamoy
Copy link
Owner

pawamoy commented May 7, 2019

I didn't know about __init_subclass__. Would you happen by chance to have an example/tutorial on how to use __init_subclass__ to builld a plugin architecture 😅?

@dsully
Copy link
Author

dsully commented May 7, 2019

http://musings.tinbrain.net/blog/2019/mar/20/plugins-and-auto-discovery-python/ is pretty good.

@pawamoy
Copy link
Owner

pawamoy commented May 7, 2019

Thank you, I'll try this!

@pipozzz
Copy link

pipozzz commented Feb 3, 2020

Hello, I have the same issue, I use self-hosted gitlab-ce. Any suggestions ?
Thanks

@pawamoy
Copy link
Owner

pawamoy commented Feb 10, 2020

Hello 🙂

I don't have much time to implement this plugin structure, but maybe you'd like to contribute and send a PR for it? If so, I'll be available to review it of course. The linked tutorial above seems to be a great starting point.

@pawamoy pawamoy added the bug Something isn't working label Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants