MercurialHttpHooks.Net 1.0.0

.Net classes for MercurialHttpHooks

Install-Package MercurialHttpHooks.Net -Version 1.0.0
dotnet add package MercurialHttpHooks.Net --version 1.0.0
<PackageReference Include="MercurialHttpHooks.Net" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MercurialHttpHooks.Net --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

MercurialHttpHooks.Net

MercurialHttpHooks gives you a chance to process Mercurial Hooks using custom HTTP server.
https://github.com/3da/MercurialHttpHooks

This project just provide .Net classes that correspond to protocol of communication with MercurialHttpHooks.

Sample project is provided.
Example code:

        [HttpPost]
        [Route("permissions")]
        public ProcessResult Post([FromBody] PushInfo obj)
        {
            if (obj.Commits.All(q => q.Message.Length > 10))
                return new ProcessResult()
                {
                    Success = true,
                    Message = "Good job\nDude"
                };

            return new ProcessResult
            {
                Success = false,
                Message = "Sorry but no"
            };
        }

This code means to deny all commits which message length is less or equal 10.

MercurialHttpHooks.Net

MercurialHttpHooks gives you a chance to process Mercurial Hooks using custom HTTP server.
https://github.com/3da/MercurialHttpHooks

This project just provide .Net classes that correspond to protocol of communication with MercurialHttpHooks.

Sample project is provided.
Example code:

        [HttpPost]
        [Route("permissions")]
        public ProcessResult Post([FromBody] PushInfo obj)
        {
            if (obj.Commits.All(q => q.Message.Length > 10))
                return new ProcessResult()
                {
                    Success = true,
                    Message = "Good job\nDude"
                };

            return new ProcessResult
            {
                Success = false,
                Message = "Sorry but no"
            };
        }

This code means to deny all commits which message length is less or equal 10.

Release Notes

First release

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
1.0.0 105 10/22/2018