GithubHelp home page GithubHelp logo

datalad-helpme's Introduction

DataLad Helpme

This repository serves automatically generated issues by way of the helpme command line client. Thank you for your patience as we are developing and testing this integration.

Usage

This integration works with helpme versions 0.0.40 and later. Datalad will be required to specify this repository base along with metadata to open an issue. As an example:

from helpme.main import get_helper
helper = get_helper(name="github")

You are required to provide the repository, title, and the body text for the issue. In the example below, we use datalad to generate a dictionary of output, and we will submit it to the repository datalad/datalad-helpme. Here is an example of submitting without a token (meaning the browser url is opened and the user must click submit. This is done simply by not exporting HELPME_GITHUB_TOKEN to the environment.

from datalad.utils import swallow_outputs
from datalad.api import wtf
import sys

repo = "datalad/datalad-helpme"
title = "Test issue opened manually by helpme"

with swallow_outputs() as cmo:
    wtf(decor="html_details")
    body = """
## What is the problem?
<!-- Please write a few sentences about the issue-->
## What steps will reproduce the problem?
<!-- What triggered this error? -->
## Is there anything else that would be useful to know in this context?
<!-- Have you had any success using DataLad before? (to assess your expertise/prior luck.  We would welcome your testimonial additions to https://github.com/datalad/datalad/wiki/Testimonials as well)-->
%s""" % cmo.out

We will want to add a hash of the problem to this, for the CI to check if the issue has been previously opened.

Next, let's run the helper headlessly. Note that this will currently still confirm the environment variables being sent from the user.

issue = helper.run_headless(repo=repo, body=body, title=title)

The above will still require confirmation to send the user environment, and then will post the issue to datalad/datalad-support. If there is no GitHub token provided in the environment, the user can fill in the sections to complete the issue. Otherwise, the issue could be submit automatically and the response from the GitHub API would be returned.

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.