Giter Site home page Giter Site logo

turnstile's People

Contributors

hjacobs avatar isnok avatar jmcs avatar lappleapple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isnok

turnstile's Issues

Add a subcommand to open specification

Add a subcommand to open specification for a specific commit. If commit is not provided then it should open the specification of latest one.

This will be particularly useful for custom URIs.

Fix unit tests in python3.4

Testing exceptions with doctests doesn't work at the same time in Python 3.4 and Python 2.7, so this tests and other complex ones should be done with py.test

TypeError when using codevalidator on commit

I have activated the codevalidator commit hook for my repository. Now i am receiving the following error on committing:

Traceback (most recent call last):
File "/usr/local/bin/zalando-turnstile-pre-commit", line 9, in <module>
load_entry_point('zalando-turnstile==1.6.1', 'console_scripts', 'zalando-turnstile-pre-commit')()
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.4/dist-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File
 "/usr/local/lib/python3.4/dist-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/turnstile/pre_commit.py", line 44, in pre_commit
    failed_checks = checks.run_checks('pre-commit', user_configuration, repository_configuration, staging_area)
  File "/usr/local/lib/python3.4/dist-packages/turnstile/checks/__init__.py", line 121, in run_checks
    result = check(user_configuration, repository_configuration, check_object)
  File "/usr/local/lib/python3.4/dist-packages/turnstile/checks/pre_commit/codevalidator.py", line 101, in check
    custom_config=codevalidator_rc)
  File "/usr/local/lib/python3.4/dist-packages/turnstile/checks/pre_commit/codevalidator.py", line 48, in codevalidator
    codevalidator_output = remove_temporary_path(codevalidator_output, temporary_dir)
  File "/usr/local/lib/python3.4/dist-packages/turnstile/checks/pre_commit/codevalidator.py", line 69, in remove_temporary_path
    lines = [regex.sub('', line, 1) for line in codevalidator_output.splitlines()]
  File "/usr/local/lib/python3.4/dist-packages/turnstile/checks/pre_commit/codevalidator.py", line 69, in <listcomp>
    lines = [regex.sub('', line, 1) for line in codevalidator_output.splitlines()]
TypeError: can't use a string pattern on a bytes-like object

My .turnstile.yml looks like this:

checks:
    - codevalidator

Add an option to override/complement regex for JIRA specification check

When using JIRA format for specification check, e.g.

specification:
    allowed_format: ['jira']

it would be useful to have a parameter to override/complement default regular expression used for validation.

Example current behaviour :

specification:
    allowed_format: ['jira']

"FIRST-42 Feature development" is valid commit message.
"SECOND-42 Feature development" is valid commit message.

Example desired behaviour :

specification:
    allowed_format: ['jira']
    allowed_schemes: ['FIRST-*']

"FIRST-42 Feature development" is valid commit message.
"SECOND-42 Feature development" is invalid commit message.

Command to upgrade turnstile

It should be easy to upgrade turnstile, for this reason there should be a command that upgrades turnstile to the latests version on pypi.

The command should check it current version is different from the latests version and if not it should use pip to upgrade itself.

Specification subcommand

Specification subcommand to check if a commit range (for example all commits in branch) have a valid specification

Move codevalidator check and command to an extension package

By moving codevalidator out of the core package makes it possible to use turnstile without having to install codevalidator.

The current package will be renamed turnstile-core and zalando-turnstile will be used as a bundle that requires both the core and codevalidator extensions.

Allow regular ticket reference as first word of message instead of URL

Not cool: Writing https://github.com/zalando/turnstile/issues/123 at the beginning of every commit message.

Cool: Writing #123 at the beginning of every commit message. Optional further information (like repository or even full URL) could be placed afterwards in parentheses like #123 (zalando/turnstile).

(Of course this depends on the SCM system you're using, should work equally well e.g. for Stash.)

Only support full uri as specifications.

The commit message should always include the full url\uri as a specification to reduce the complexity.

The specification format should be removed from the configuration as it no longer makes sense.

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.