Code Monkey home page Code Monkey logo

org-github-issues's Introduction

org-github-issues

Sponsored

A helper function to create org-mode TODOs out of open issues and review requests in a github repository.

Installation

Using straight.el

An example of how you can install this package using straight.el:

(use-package org-github-issues :straight (org-github-issues :host github :repo "iensu/org-github-issues")
  :defer t
  :config
  (setq org-github-issues-user "iensu"                                                                                   ;; Specify Github user
        github-repositories '("dekorateio/dekorate" "quarkusio/quarkus")                                                 ;; My repositories
        org-github-issues-org-file "~/Documents/org/github.org"                                                          ;; My org file
        org-github-issues-tags '("github" "triage")                                                                      ;; Always add these labels
        org-github-issues-issue-tags '("issue")                                                                          ;; Add these only on issues
        org-github-issues-pull-tags '("pull")                                                                            ;; Add these only on pull requests
        org-github-issues-auto-schedule "+0d"                                                                            ;; Enable automatic scheduling
        org-github-issues-filter-by-assignee t                                                                           ;; Enable filter by assignee
        org-github-issues-headline-prefix t)                                                                             ;; Prefix all headlines with repository name
  (mapcar (lambda (r) (run-with-idle-timer 3600 t (lambda () (org-github-issues-sync-issues r)))) github-repositories))  ;; When idle for an hour loop over my projects and sync

Usage

Before use you need to set the variable org-github-issues-org-file to point to an existing file in which to write the fetched issues.

In the specified file, create a header for each of your github projects, .e.g iensu/org-github-issues. Each header must match the repository name (OWNER/REPO) exactly.

Each header can be a top level header or nested and may optionally contain tags:

* Emacs
** iensu/org-github-issues
** sigma/gh
** magit/forge                :magit:
** magit/magit                :magit:
* Other projects
** foo/bar

Any header that doesn't match the (OWNER/REPO) pattern will be ignored.

After setup you can run one of the following commands:

  • M-x org-github-issues-sync-issues Will prompt you for the repository you want to fetch issues for.
  • M-x org-github-issues-sync-pulls Will prompt you for the repository you want to fetch issues for.
  • M-x org-github-issues-sync-all Will directly fetch all issues and pull requests for all repositories found in the org-github-issues-org-file.

Authentication

If you are experiencing authentication issues you need to set org-github-issues-user to the user you want to authenticate with and then create a Personal Access Token.

If you want to track private repositories you will need to select the repo scope and org:read if you want to also read repositories belonging to your organizations. See this issue for more info.

You can provide the token by using auth-sources and add an entry to your ~/.authinfo.gpg file (this article gives a good introduction to working with auth-sources):

machine org-github-issues login <USERNAME> password <TOKEN>

The less secure way is to set org-github-issues-token, but please go with the auth-sources option if your token has access to private repositories.

Customization

The following custom options are available:

Option Type Description Default Value
org-github-issues-user string REQUIRED Github user name to use for authentication nil
org-github-issues-org-file string Path to an existing org-mode file in which to write issues "~/Dropbox/org/projects.org"
org-github-issues-filter-by-assignee boolean Flag to enable filtering issues by assignee. nil
org-github-issues-assignee string The assignee to use for filtering user-login-name
org-github-issues-headline-prefix boolean Flag to enable prefixing headlines with the repository name nil
org-github-issues-auto-schedule string Threshold for automatically scheduling new issues "+0d"
org-github-tag-transformations alist :value-type (group-string) An alist with trasnformations to apply to github labels when converting them to tags '(("[\s/-]+" "_")

org-github-issues's People

Contributors

iensu avatar iocanel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

org-github-issues's Issues

Not finding assigned issues.

Hi there. I've had this working at some point, but something seems to be up b/c it's not working any longer. Not clear what, if anything, changed on my end.

Here's my config:

(use-package org-github-issues
  :straight (org-github-issues :host github :repo "iensu/org-github-issues")
  :defer t
  :config
  (setq org-github-issues-user "justinabrahms" ;; Specify Github user
        github-repositories '("ebay/goose") ;; My repositories
        org-github-issues-org-file "~/docs/github-issues.org" ;; My org file
        org-github-issues-tags '("github" "triage") ;; Always add these labels
        org-github-issues-auto-schedule "+0d" ;; Enable automatic scheduling
        org-github-issues-filter-by-assignee t ;; Enable filter by assignee
        org-github-issues-headline-prefix t) ;; Prefix all headlines with repository name

  ;; When idle for an hour loop over my projects and sync
  (mapcar (lambda (r)
            (run-with-idle-timer 3600 t (lambda () (org-github-issues-sync-issues r))))
          github-repositories))

When I do an M-x org-github-issues-sync-issues, it tells me:

No open issues found in repository https://github.com/ebay/goose

which is definitely not true.

I have validated my personal access token works just fine with

curl -H "Authorization: token my-personal-access-token-here" https://api.github.com/users/codertocat -I

I'd love any debugging steps you may have. Especially ones that expose raw api calls to the github web service.

Hi, can you explain how to authenticate?

I get a message like:

error in process filter: url-http-handle-authentication: Wrong authorization used for https://api.github.com/repos/holtzermann17/toki-pona-emoji/issues

I'm not sure what I need to do to get the authentication set up correctly. Could you please add some extra information about that?

Sync problem

Do you have any idea what could cause this message when trying to sync?

autoload-do-load: Symbol’s value as variable is void: ogi--issues-issue-list

I understand the variable is empty, but I'm not particularly adept at debugging Lisp. Starting emacs with --debug-init gives a similar message

Debugger entered--Lisp error: (void-variable ogi--issues-issue-list)

I installed org-github-issues from a file (not using straight.el) so the most likely case is that I load incorrectly in my init file. Perhaps there's some sort of issue/bug...

  • emacs 29.1
  • kernel: 6.1.53-1-MANJARO

Testing

Trying out an assigned issue

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.