GithubHelp home page GithubHelp logo

grv87 / releases Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mantisbt-plugins/releases

0.0 1.0 0.0 341 KB

Basic version of 'GitHub Releases' for MantisBT, with REST API

Home Page: https://app1.spmeesseman.com/projects

License: MIT License

PHP 97.62% CSS 0.76% JavaScript 1.62%

releases's Introduction

Releases MantisBT Plugin

app-type app-lang app-publisher authors

MantisBT issues open MantisBT issues closed MantisBT version current MantisBT version next

Description

This plugin is a continuation of the legacy releasemgt plugin. It allows user to store releases composed of a changelog and assets (file downloads). There have been several visual improvements and bug fixes, as well as a new REST API to create releases and upload changelogs with assets.

This plugin was developed and tested on MantisBT 2.21.1.

Installation

Extract the release archive to the MantisBT installations plugins folder:

cd /var/www/mantisbt/plugins
wget -O Releases.zip https://github.com/mantisbt-plugins/Releases/releases/download/v1.0.1/Releases.zip
unzip Releases.zip
rm -f Releases.zip

Ensure to use the latest released version number in the download url: MantisBT version current (version badge available via the ApiExtend Plugin)

Install the plugin using the default installation procedure for a MantisBT plugin in Manage -> Plugins.

For Apache configuration, see the example Location directive found in api/apache2-site-config

Issues and Feature Requests

Issues and requests should be submitted on my MantisBT site.

REST API

This plugin exposes a REST API for creating/uploading releases. The Authorization header value must be set to the API token for authentication in all requests. The token can be sreated in User Preferences for the user that will be used to make the requests under.

Example header:

Content-Type = application/json; charset=UTF-8
Authorization: DvhKlx9_g5dNkBEI4jqVmwAxaN9a1y3P

The following endpoints are available:

GET: /plugins/Releases/api/releases/{project}/{id}

Not supported in v1.x

POST: /plugins/Releases/api/releases/{project}

Creates the specified version if it does not already exists. Assets are attached to created or pre-existing releases. The "release" is unique to the "version", each release can have only one version and vice versa. The url part "{project}" is the MantisBT project name, case sensitive.

Request Parameters

Name Description Type Possible Values Default Value Required
version The version string i.e. 1.5.14 or 2.1.21 string yes
notes The version notes, or changelog. Can be text, html, or markup string no
notesismd Set this flag to 1 if the notes field contains markdown enum 0, 1 0 no
assets File assets array(object) no
dryrun Set this flag to 1 to perform a dry run only enum 0, 1 0 no

File asset parameters

Name Description Type Possible Values Default Value Required
name The file name string yes
data The file data, base64 encoded string yes
desc The file description string no
type The mime type of the file string Valid mime type application/octet-stream no

The mime-type, if not provided by the client, will be determined by the plugin. If a mime type cannot be found, application/octet-stream will be used.

Example JSON Request Body

{
    "version": "1.4.3",
    "notes": ".......",
    "assets": [
    {
        "name": "package.json",
        "data": "VGVzdCB0ZXN....0IHRlc3QgdGVzdA=="
    }]
}

Example Response Body

{
    "id": 1432,
    "url": "https://my.domain.com/mantisbt/plugin.php?page=Releases/releases#1.4.3
}

PUT: /plugins/Releases/api/releases/{project}/{id}

Not supported in v1.x

DELETE: /plugins/Releases/api/releases/{project}/{id}

Not supported in v1.x

Screenshots

Plugin Releases Screen

Release Page

Authors of Original Code Base

releases's People

Contributors

spmeesseman avatar

Watchers

James Cloos avatar

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.