v2.0.0: The Future (Python3) is here
Changelog
Debian packages: https://bintray.com/sociomantic-tsunami/tools/git-hub/v2.0.0
Migration
Python version 3 required
git-hub
has been ported to Python 3.
As development of Python ended January 1st 2020, the decision was made to drop backwards compatibility.
General migration instructions are given below:
- Check if **Python3** is installed by using `python --version` or check if the `python3` program exists.
- If that's not the case use your package manager to install it. E.g. `apt install python3` for **Debian** based distributions.
Use #-#
for comments instead of #
The symbol #
at the start of a line is a header tag in Markdown and #-#
should be used instead for comments. The syntax of the new comment header does not look aesthetically good and it is not intended for practical use but it will avoid mangling markdown or any other markup language.
If you have any script that creates new issues, PRs or comments then they will need to be updated to the new comment header.
New Features
Allow specifying a command to get the oauthtoken
Sometimes storing OAuth token in plain text is not a great idea, so now the oauthtoken
configuration variable can use a shell command to get the token instead. Just prepend a !
and write the command you want to run instead of using the token.
For example:
git config hub.oauthtoken '!password-manager ~/my.db get github-oauth-token'
Support issue and pull request templates
- The commands
git-hub issue new
andgit-hub pull new
add template contents to the issue or pull request message respectively.
Looks for a template file in the root directory of the project, the .github
directory and the .git
directory until the first template file is found. Then reads the content from the template file found and adds it to the message of the issue or pull request.
The supported file names for issue templates are ISSUE_TEMPLATE
and ISSUE_TEMPLATE.md
, and for pull request templates are PULL_REQUEST_TEMPLATE
and PULL_REQUEST_TEMPLATE.md
.
The order for template lookups matters meaning that a template file name without extension is looked up first followed by the template file name with extension .md
.
Note that only the content of the first issue or pull request template found is added to the message of the issue or pull request respectively.
Finally the commands git-hub issue new
and git-hub pull new
also accept --no-template
to skip adding the template content to the issue or pull request message respectively.
Details
- Merge tag 'v1.1.1' into v2.x.x (34c4ff1)
- Update release notes (781f4f2)
- Fix unicode in PR title or description (50c94dc)
- Decode bytes before using them as a string (66fd0e4)
- Add release notes for oauthtoken commands (c035103)
- Remove oauthtokencmd config and use oauthtoken (2eb0c58)
- Add option to retrieve oauthtoken from a password store (1bc119e)
- Add Debian package badge (00561d7)
- Remove trailing spaces (0c5290a)
- Add llucax (myself) to the FUNDING.yml file (5af7cb7)
- Add release notes for python3 migration (139f09b)
- Support issue and pull request templates (8964c1c)
- Fix beaver build cmd (ccdf659)
- Update python dependency in README (d46a87f)
- Refactor filtering in IssueCmd (b9db8e1)
- Remove duplicate imports (9f30d89)
- Change hardcoded python2 to python3 (02339a6)
- Change default python version to python3 in Makefile (357dac0)
- Port git-hub script to python 3 (c376fb7)
- Add a release note for the new comment header (cdece3a)
- Use
#-#
for comments instead of#
(e38cab3) - Clear release notes after release (2806148)