Skip to main content

Integration of GitHub issues with Docassemble interviews for collecting user feedback

Project description

docassemble.GithubFeedbackForm

A package that uses the GitHub API to gather feedback and then submit issues to Github that can be embedded into a Docassemble interview. Makes it easy to collect per-page feedback.

This package is designed to support the following workflow:

  1. Work is stored on a public GitHub repository, or at least, you setup a repository to collect feedback.
  2. There is one package per "interview"/"app".
  3. Each question block has a unique question ID.
  4. Preferably--questions are triggered in an interview order block. If you use a series of mandatory blocks instead of a single mandatory block, the variable listed in the bug report may not be as useful.

Getting started

  1. Create a new GitHub user and create a personal access token on it. The personal access token needs minimal permissions. Specifically, it needs to be allowed to make pull requests. Pull request access is allowed for anyone by default when you create a new, public GitHub repository.
  2. Edit your config, and create a block like this:
github issues:
  username: "YOUR_NEW_DEDICATED_ISSUE_CREATION_ACCOUNT"
  token: "..." # A valid GitHub personal access token associated with the username above
  default repository owner: YOUR_GITHUB_USER_OR_ORG_HERE
  allowed repository owners: # List the repo that your account will be allowed to create issues on
    - YOUR_GITHUB_USER_OR_ORG_HERE 
    - SECOND_GITHUB_USER_OR_ORG

Note that it is important to provide a list of allowed repository owners. This is used to prevent your form from being used to spam GitHub repositories with feedback.

  1. Add a link on each page, in the footer or under area.
    You can use the feedback_link() function to add a link, like this: [:comment-dots: Feedback](${ feedback_link(user_info()) } ){:target="_blank"}

    Optional parameters:

    • i: the feedback form, like: docassemble.AssemblyLine:feedback.yml
    • github_repo: repo name, like: docassemble-AssemblyLine
    • github_user: owner of the repo, like: suffolklitlab
    • variable: variable being sought, like: intro
    • question_id: id of the current question, like: intro
    • package_version: version number of the current package
    • filename: filename of the interview the user is providing feedback on.

    Each has a sensible default. Most likely, you will limit your custom parameters to the github_repo if you want feedback links to work from the docassemble playground.

    You will also need to include the github_issue.py module in your parent interview, like this:

    ---
    modules:
      - docassemble.GithubFeedbackForm.github_issue
    
  2. Optionally, create your own feedback.yml file. If you want a custom feedback.yml, it should look like this, with whatever customizations you choose:

include:
  - docassemble.GithubFeedbackForm:feedback.yml
---
code: |
  al_feedback_form_title = "Your title here"  
---
code: |
  # This email will be used ONLY if there is no valid GitHub config
  al_error_email = "your_email@yourdomain.com"
---
template: al_how_to_get_legal_help
content: |
  If you need more help, these are free resources:

  ... [INCLUDE STATE-SPECIFIC RESOURCES]      

You may also want to customize the metadata: title, exit url and override any specific questions, add a logo, etc.

Author

Quinten Steenhuis, qsteenhuis@suffolk.edu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docassemble_githubfeedbackform-0.5.1.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docassemble_githubfeedbackform-0.5.1-py3-none-any.whl (44.0 kB view details)

Uploaded Python 3

File details

Details for the file docassemble_githubfeedbackform-0.5.1.tar.gz.

File metadata

File hashes

Hashes for docassemble_githubfeedbackform-0.5.1.tar.gz
Algorithm Hash digest
SHA256 185b2b06c7b6a57a05741cec379e1bf54594cffd120953f50fa63357695000dc
MD5 23154181fdf1815fe2a4267df7ba1a05
BLAKE2b-256 871c429406ef4cabba1ad90f3c160fb1edce0a623f0ad7ebf28f1c4e51386812

See more details on using hashes here.

File details

Details for the file docassemble_githubfeedbackform-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for docassemble_githubfeedbackform-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89ee31dc8b8617454bdcbaf20f98adc2838584f7d8e7ca2de6e8cb26ead824a8
MD5 c98bd4e9b95e465b1f1a3d0d4a7f1f54
BLAKE2b-256 2ea8d2f1c59cd9abdc09ac6d8dfb9aa3fba31709b095cc069de841ecc4247569

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page