Code Monkey home page Code Monkey logo

apache-git-sync-tool's People

Contributors

bobef avatar drscream avatar hendrauzia avatar krumst 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apache-git-sync-tool's Issues

Support Bitbucket

Just had to do this for Bitbucket support:

  •   if ( _executeCommand( 'Testing ssh access to github', 'ssh -T [email protected]' ) == 255 ) {
    
  •   if ( _executeCommand( 'Testing ssh access to github', 'ssh -T [email protected]' ) == 255 ) {
    

Why not just detect this from the "remote" config setting instead of hard-coding? I'm using Bitbucket private repos and it appears to be working great. I setup the webhook in Bitbucket also, but haven't committed anything yet. I'll update if there are issues.

Features added by myself to document

  • New config format: {"projects": { "name": {} }}
  • $config->user, $config->pass
  • $config->logs (true or path)
  • $config->supportEmailFrom
  • Git URLs (including submodules) must be added as git@github... not https://github... or key authentication will not work and git will fail even for public repos
  • Document the usage scheme with machine account instead of www-data deploy key.

Be able to email commit authors

Have something like $AUTHORS which will email all who submitted since last pull in case of error.

Emails of all authors of un-pulled remote changes:

git --no-pager log --pretty='%ae' HEAD..@{u} | sort | uniq

Consider the case where there is no existing repository and authors are all authors.

git --no-pager log --pretty='%ae' | sort | uniq

For specific branch add "--branches=test".

And the payload seems to contain info about the pusher.

Port to nodejs with libgit2

Node.js 0.11.12 has execSync so we can easily port to nodejs with cli git and get rid of the php dependency. Not so important though.

Be able to have multiple branches coexist

We need to able to configure in the JSON which branches to synchronize per project and they should go to separate directories, so we can have multiple versions. For example:

{
        "name": "test",
        "remote": "[email protected]:Perennials/test.git",
        "branches": {
            "master": {
                "local": "~/test/dev",
                "autosyncEnabled": true,
                "commandOnFinish": "ls -l",
                "urlOnFinish": "http://google.com",
                "cleanAndCloneLatestVersion" : false,
                "syncSubmodules": false
            },
            "stable": {
                "local": "~/test/stable",
                "autosyncEnabled": true,
                "commandOnFinish": "ls -l",
                "urlOnFinish": "http://google.com",
                "cleanAndCloneLatestVersion" : false,
                "syncSubmodules": false
            }
        }
     }

Also please compare the branch in the commit and ignore the notification if it for commit in different branch, so we won't trigger updates when devs commit to their own branches http://stackoverflow.com/questions/20791210/how-to-restrict-github-post-receive-webhook-to-master-branch-only

Add support email per project

Please add support email per project that can override the global one (if provided). I want to organize our workflow so project managers will take care of their projects, they will setup the sync tool and the repositories for their projects and they will take care of it, not a central support.

Remove chmod support

We can now have multiple commands on finish, so special chmod support makes no sense.

Be able to sync branch deletion and consider tag pushes

GitHub sends notification when branches are deleted, so delete them locally (should be disableable on global and project level).

Also GitHub sends push notification when tags are added and sync.php takes refs/tag/TAGNAME as brach called TAGNAME, where branches come as refs/heads/BRANCHNAME, so do be naive about this stuff and check what is actually coming.

Support local paths

If the path does not start with, make it relative to the project or the gobal base path.

Have default value for config variables

Please add default values for the config fields, so one can fill only the ones he needs and the undefined properties will be replaced with the default:

{
"autosyncEnabled": true,
"commandOnFinish": null,
"urlOnFinish": null,
"cleanAndCloneLatestVersion" : false,
"syncSubmodules": true
}

Simplify the clean option

Although there was a bit misunderstanding between my idea and your implementation, your implementation turned out better. But please make the clean option simpler - it should be argument like &clean=true and all it should is rm -rf the directory before checkout, no need to delete the .git directory etc. This will be useful option when testing update/install scripts of projects.

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.