{"id":18081966,"url":"https://github.com/vindarel/git-commit-insert-issue","last_synced_at":"2026-02-15T10:37:04.741Z","repository":{"id":67525160,"uuid":"91810958","full_name":"vindarel/git-commit-insert-issue","owner":"vindarel","description":"(mirror) Get and reference an issue in a commit message. Github, Gitlab, Bitbucket.","archived":false,"fork":false,"pushed_at":"2020-12-30T17:23:54.000Z","size":252,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-23T07:38:03.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gitlab.com/emacs-stuff/git-commit-insert-issue/","language":"Emacs Lisp","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vindarel.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["vindarel"],"ko_fi":"vindarel"}},"created_at":"2017-05-19T13:51:58.000Z","updated_at":"2020-12-30T17:23:57.000Z","dependencies_parsed_at":"2023-02-20T20:30:15.519Z","dependency_job_id":null,"html_url":"https://github.com/vindarel/git-commit-insert-issue","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/vindarel/git-commit-insert-issue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Fgit-commit-insert-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Fgit-commit-insert-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Fgit-commit-insert-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Fgit-commit-insert-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vindarel","download_url":"https://codeload.github.com/vindarel/git-commit-insert-issue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2Fgit-commit-insert-issue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29475776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T10:25:47.032Z","status":"ssl_error","status_checked_at":"2026-02-15T10:25:01.815Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-31T13:17:32.059Z","updated_at":"2026-02-15T10:37:04.737Z","avatar_url":"https://github.com/vindarel.png","language":"Emacs Lisp","funding_links":["https://github.com/sponsors/vindarel","https://ko-fi.com/vindarel","https://liberapay.com/vindarel/"],"categories":[],"sub_categories":[],"readme":"[[http://melpa.org/#/git-commit-insert-issue][file:http://melpa.org/packages/git-commit-insert-issue-badge.svg]]\n\n* Search and insert the right issue at \"Fixes #\"\n\nGoal: In a magit commit buffer, I want to complete the issue when I type\n\"Fixes #\".\n\nThis actaully works with any other [[https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword][keyword supported by Github]]:\n\n: close closes closed fix fixes fixed resolve resolves resolved\n\n[[https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#default-closing-pattern][Gitlab]] and [[https://support.atlassian.com/bitbucket-cloud/docs/resolve-issues-automatically-when-users-push-code/][Bitbucket]] understand more keywords, but actually a sharpsign =#=\nalone is enough for them to reference and link back to an\nissue. However, fetching the list of issues is triggered by a keyword followed\nby a sharpsign, and not =#= alone. We recognize also these keywords:\n\n: for see reopen hold wontfix invalidate re ref refs addresses\n\nand the =s= and =ing= variants: =invalidates=, =invalidating= etc.\n\nThis works with *individual projects*  (repo of type username/projectname),\n*groups* (groupname/projectname) and *forks*  (where the issues are on\nthe original repo).\n\nBitbucket: works with *private projects*. Install [[https://github.com/tjaartvdwalt/bitbucket.el/][bitbucket.el]] (in melpa).\n\nIf you have more than one remote in your project's =.git/config=, read below.\n\n#+BEGIN_HTML\n \u003cimg src=\"https://gitlab.com/emacs-stuff/git-commit-insert-issue/raw/master/img.png\" \u003c/img\u003e\n#+END_HTML\n# https://cloud.githubusercontent.com/assets/5016978/6471672/e36e8c00-c1a1-11e4-91a1-dd5481d57c36.png\n\n** Usage\n\nActivate the minor mode\n: M-x git-commit-insert-issue-mode\n\nThen, in a magit  commit buffer (=git-commit-mode=), type \"Fixes  #\"\n(or use another keyword) and choose the issue from the list.\n\nTo always activate the mode:\n: (add-hook 'git-commit-mode-hook 'git-commit-insert-issue-mode)\n\nYou can also call it with\n: M-x git-commit-insert-issue-ask-issues\n\nand you can call it programmatically:\n#+BEGIN_SRC emacs-lisp\n(--map (insert (concat it \"\\n\"))\n       (git-commit-insert-issue-github-issues-format \"inkel\" \"github-issues.el\"))\n#+END_SRC\n\n*** Connect to your Bitbucket account\n\nSee [[https://github.com/tjaartvdwalt/bitbucket.el/#authentication][its README]], but shortly it boils down to\n\n#+BEGIN_SRC emacs-lisp\n(setq bitbucket-basic-auth \"my-basic-auth-token\")\n#+END_SRC\n\nor\n\n#+BEGIN_SRC shell\nexport BITBUCKET_BASIC_AUTH=my-basic-auth-token\n#+END_SRC\n\n*** Working with many remotes (and one issues source)\n\n    The first remote in your =.git/config=  will be the one we get the\n    issues from.\n\n    A  project may  have many  remote git  urls: the  upstream one  on\n    Github, your fork and a copy  on Gitlab, or maybe the original one\n    in a self-hosted Gitlab instance and a mirror on Github. Where are\n    the issues then?  Git itself can  not tell us, so we decide we'll\n    go with  the first  remote url in  your =.git/config=.   Just edit\n    this file manually to set it right.\n\n    Example:\n\n    In this example, we infer that the =foobar= remote is the one that\n    holds the issues, so we'll try an API call to =foo.com=, assuming\n    it is Gitlab. That fails (you see a nice error message).\n\n    #+BEGIN_SRC text\n    # .git/config\n    [remote \"foobar\"]\n\turl = git@foo.com:a-private-remote/project.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n    [remote \"origin\"]\n\turl = git@gitlab.com:emacs-stuff/git-commit-insert-issue.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n    #+end_src\n\n    You should put =origin= first:\n\n    #+BEGIN_SRC text\n    # .git/config\n    [remote \"origin\"]\n\turl = git@gitlab.com:emacs-stuff/git-commit-insert-issue.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n    [remote \"foobar\"]\n\turl = git@foo.com:a-private-remote/project.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n    #+end_src\n\n    We can maybe do better, discuss on [[https://gitlab.com/emacs-stuff/git-commit-insert-issue/-/issues/12][#12]].\n\n*** Plug with ido (ivy or helm work out of the box)\n\nThe code uses the default =completing-read= function to interactively\nask for the issue. If =ivy= or =helm= are activated, they will pick it up\nand you have nothing to do.\n\nHowever ido-mode doesn't (strangely). So we can set the\ncompleting-read function to use it:\n\n: (setf git-commit-insert-issue--completing-fun #'ido-completing-read)\n\n\n** Installation\n\nThis package is in [[http://wikemacs.org/wiki/MELPA][MELPA]], so you can install it with [[http://wikemacs.org/wiki/Package.el][package.el]]:\n\n: M-x package-install RET git-commit-insert-issue RET\n\n(you may need a =M-x package-refresh-contents=).\n\nAlternatively, you can download this  repo and call =M-x load-file= on the\nelisp source.\n\n*** Dependencies\n\n- ghub (which also provides glab and is for Emacs 25+)\n- projectile\n- s.el\n\nThey are all in MELPA.\n\n** Issues\n\n- if you play too much with it, you can reach github's rate limit.\n\n[[https://github.com/inkel/github-issues.el/issues][Issues for github integration of github-issues.el]] :\n\n# export: both uses an org table with many columns. Eval with C-c-c or\n# execute the line with C-x-e\n#+BEGIN_SRC emacs-lisp\n(--map (insert (concat it \"\\n\")) (git-commit-insert-issue-github-issues-format \"inkel\" \"github-issues.el\"))\n#10 - Why not just use the gh package?\n#1 - Doesn't work on private repos.\n#+END_SRC\n\n\n#+BEGIN_SRC emacs-lisp :exports none\n;;(issues-get-issues \"inkel\" \"github-issues.el\")\n#+END_SRC\n\n\n** Todo\n\n- [ ] tests\n- [ ] cache\n- [X] gitlab integration:\n  - [X] Get opened issues from gitlab\n  - [X] Get a list of strings with \"id - title\"\n  - [X] choose with ido and insert in buffer: =M-x git-commit-insert-issue-gitlab-insert=.\n  - [X] choose github or gitlab, depending on project.\n    - [X] get the remote server in git config\n  - [X]  make it work for  projects in groups (i.e,  \"emacs-stuff/project\" and\n    not \"vindarel\".\n    - [X] get the group name in git config\n  - [±] error handling (bad project name, etc)\n\n** Ko-fi \u0026 Liberapay\n\nYou use this daily ? You feel like pushing me to un-rot the code ? You\ncan offer me a beer :]\n\nhttps://liberapay.com/vindarel/\n\nhttps://ko-fi.com/vindarel\n\nThank you \u003c3\n\n(why? I'm working towards independance with free software projects now\nso I must practice in asking for support…)\n\n**  Changelog\n\n*** v0.4 (December, 2020)\n\n- replaced deprecated =github-issues= by =ghub=. That makes Emacs 25+\n  a requirement.\n- fixed Gitlab for public repositories.\n- fix when parsing the first remote fails, add an explicit error message.\n\n*** v0.3.2\n\n    - added the variable =git-commit-insert-issue--completing-fun=, so\n      we can set it to =ido-completing-read=. Ivy and Helm work out of\n      the box. \u003c2020-10-08 Thu\u003e\n    - remove  the harcoded  =ido-completing-read=  and  make room  for\n      ivy. \u003c2017-11-01 mer.\u003e\n\n*** v0.3 \u003c2017-04-24 lun.\u003e\n\n    - Add Bitbucket support (Tjaart van der Walt)\n\n*** v0.2\n\n    - Gitlab support: private and public, individual, groups or forks.\n      We  then consider  the project  url  and username  of the  first\n      remote to appear in the user's =.git/config=.\n    - ido (with \\n) instead of helm\n    - auto gitlab login\n    - more error handling\n    - github-issues dependency in melpa\n\n*** v0.1 - release on Melpa\n\n    - Github only\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvindarel%2Fgit-commit-insert-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvindarel%2Fgit-commit-insert-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvindarel%2Fgit-commit-insert-issue/lists"}