Git Product home page Git Product logo

committee's People

Contributors

denvera avatar edisonywh avatar gabrielpra1 avatar purplemyst avatar thiamsantos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

committee's Issues

Backup current tasks before `mix committee.install`

Currently as it stands, mix committee.install will override the existing hooks scripts, so it would be nice if we could back up the existing scripts also.

By backup, I'm just thinking maybe it's just renaming + prefixing the executables from pre-commit to like old-pre-commit, but any other ideas are also welcomed.

This would also allow for a nicer uninstallation process where it reverts the changes made by committee #3

Relevant Elixir documentation for File.rename/2

Team members cannot run installation

A little oversight, but right now the installation script will check if commit.exs exists, and if it does, stops the execution of installation.

However, this means that let's say in a team of 3, if one person in the team installed, commit.exs will be git-tracked, now if it's pushed to repo and then the other two people pull it down, and try to run mix committee.install again, they won't run the git hooks installation part, because commit.exs exists.

Not quite sure what will be fix, maybe always run the git hooks installation? (but then this will override the backup). So ideally other team members should be able to run it.

Another idea I can think of is to create sort of like a "sentinel file". commit.exs should be that, but that's not enough because it's git-tracked, which means I need a gitignored version of sentinel file. Maybe could create a file inside .git/hooks/committee.checksum or something that acts as a sentinel, and run install if that file doesn't exist?

Add `mix committee.uninstall`

It'd be nice to have a way to get rid of Committee. As it stands now, once you've ran mix committee.install, you'd get the executables in .git/hooks, however they'll remain there even if you remove committee as a dependency. That's no good, so it'd be nice to have a way to remove all script generated by committee.

Maybe as part of uninstallation, we could revert the backup (#4), that might be nice.

Warn if user delete `commit.exs`

Right now if a client has ran mix committee.install, the .git/hooks hooks will be installed for the supported hooks and those hooks scripts will just run a mix committee.runner #{hook_name}.

Inside the runner file, it will attempt to compile the existing commit.exs, however here's the issue, if commit.exs file is deleted, git actions will fail now.

The fix is probably to just check if the file exists before compiling, if not then give a friendly warning message that it wasn't found and is running without one. If #3 happens also it would be nice to prompt user to run this task to cleanly uninstall Committee

When uninstalling hooks, the .committee file is deleted

I think the file shouldn't be deleted but maybe moved to .committee.backup.exs, we can add an option to committee.uninstall like --delete to delete the hooks file.

I did lost my hooks while testing them because before committing it I wanting to just deactivate committee by running mix committee.uninstall.

From my point of you, a config file shouldn't be deleted while uninstalling/removing, instead it depends of the user to do it or not.

Maybe it's just me ^^

Thanks

Add some more examples of git hooks scripts

I'd like to have a section on README that is basically just a compilation of different scripts, such as branch naming convention etc.

Ideas

One good example might be to add one to show what packages are outdated with mix deps.outdated, and can maybe even take it a step further and disallow commit if packages are outdated (can be done by chaining mix deps.update --all && git diff --exit-code)

Rename commit.exs to .committee.exs

That's is a common pattern in elixir for config file, as we have for the formatter config been .formatter.exs and credo config file been .credo.exs. We could do the same thing on committee. I think it also would avoid confusing because commit.exs seems to be something really specific for pre/pos-commit hooks, and if we intend to add another types of hooks that name could be a little strange.

Committee resolves to wrong path

Downloaded it to another project and realised the path resolution was wrong (I've been testing with the Committee repo itself so did not realise it)

upgrading CI ?

Hi,

I regularly use committee to help me with formatting, so I decided to have a go at updating the CI (I saw it is still using old elixir versions, with old source formatting).

It may be a minor change, but in case you want to have a look at it, I have a working workflow for elixir 1.12, 1.13 and 1.14 there.

I also changed my default branch to main, but I am not sure if it is something you'd want to do here ?

Anyway, let me know if you want a specific PR related to some of these changes in this repo.

Cheers !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.