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

Fix various issues #13

Merged
merged 17 commits into from Mar 23, 2020
Merged

Fix various issues #13

merged 17 commits into from Mar 23, 2020

Conversation

gabor-boros
Copy link
Owner

@gabor-boros gabor-boros commented Mar 23, 2020

Reason for the change

We had various smaller issues across project. This PR will fix those issues and gives a bit better config handling.

Description

  • Pull request body generation moved to the common GitMixin class
  • Pillar will always create lock file in the working directory
  • Call expandvar and expanduser of configuration files
  • Hammurabi only works in the current working directory
  • Read settings (pyproject.toml) path from HAMMURABI_SETTINGS_PATH environment variable
  • Remove faulty author of git committing
  • Only attempt to create a PR if there is no PR from Hammurabi
  • Fix double committing issue
  • Fix committing of laws when nothing changed
  • Fixed several CLI arguments related issues
  • Removed target directory setting from config and CLI

Code examples

N/A

Checklist

  • Unit tests created/updated
  • Documentation extended/updated
    - [ ] Stubs created/updated

References

N/A

@gabor-boros gabor-boros added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Mar 23, 2020
@gabor-boros gabor-boros requested a review from uvegla March 23, 2020 07:27

repo_url: str = self.repo.remote().url

if re.match(r"^http(s)?://", repo_url):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think a simple repo_url.startswith('http://') or repo_url.startswith('https://') is slightly more readable here.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Hm, maybe yes. The only concern I have against the startswith is that it's longer, which could make the code less readable on the long run. WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am fine with the regex as well. 😃👍

hammurabi/mixins.py Outdated Show resolved Hide resolved
uvegla
uvegla previously approved these changes Mar 23, 2020
@codeclimate
Copy link

codeclimate bot commented Mar 23, 2020

Code Climate has analyzed commit ad1b26d and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (95% is the threshold).

This pull request will bring the total coverage in the repository to 95.2% (0.2% change).

View more on Code Climate.

@gabor-boros gabor-boros merged commit 7df429a into master Mar 23, 2020
@gabor-boros gabor-boros deleted the fix-various-issues branch March 23, 2020 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants