GothenburgBitFactory / bugwarrior

Pull github, bitbucket, and trac issues into taskwarrior
http://pypi.python.org/pypi/bugwarrior
GNU General Public License v3.0
732 stars 209 forks source link

[Github] Remove basic auth support from service and docs #906

Closed selfire1 closed 1 year ago

selfire1 commented 2 years ago

Hi! Just set up my bugwarrior config to sync with Github. I get this error however:

INFO:bugwarrior.db:Service-defined UDAs exist: you can optionally use the `bugwarrior-uda` command to export a list of UDAs you can add to your taskrc file.
INFO:bugwarrior.services:Starting to aggregate remote issues.
INFO:bugwarrior.services:Spawning 1 workers.
Worker for [ObsTheme] failed: Non-200 status code 404; 'https://api.github.com/user/issues?per_page=100'; '{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user"}'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/services/__init__.py", line 504, in _aggregate_issues
    for issue in service.issues():
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/services/github.py", line 459, in issues
    self.get_directly_assigned_issues().items())
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/services/github.py", line 345, in get_directly_assigned_issues
    for issue in self.client.get_directly_assigned_issues():
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/services/github.py", line 61, in get_directly_assigned_issues
    return self._getter(url)
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/services/github.py", line 96, in _getter
    json_res = self.json_response(response)
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/services/__init__.py", line 481, in json_response
    raise IOError(
OSError: Non-200 status code 404; 'https://api.github.com/user/issues?per_page=100'; '{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user"}'
INFO:bugwarrior.services:Terminating workers
ERROR:bugwarrior.command:Aborted (critical error in target 'ObsTheme')
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/command.py", line 73, in pull
    synchronize(issue_generator, config, main_section, dry_run)
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/db.py", line 357, in synchronize
    for issue in issue_generator:
  File "/usr/local/lib/python3.9/site-packages/bugwarrior/services/__init__.py", line 572, in aggregate_issues
    raise RuntimeError(
RuntimeError: critical error in target 'ObsTheme'

This is my bugwarriorrc file:

[general]
targets = ObsTheme
inline_links = False

[ObsTheme]
service = github
github.login = selfire1
github.password = ************
github.username = selfire1
github.include_repos = obsidian-you-theme
github.import_labels_as_tags = True
github.description_template = #{{githubnumber}}: {{githubtitle}} +issue
github.project_template = Dev.ObsTheme

I am quite new to bugwarrior so I would appreciate any help! 🤗

ryneeverett commented 2 years ago

See https://docs.github.com/en/rest/overview/troubleshooting. My reading is that you'll need to use github.token rather than github.password now.

Sounds like we need to remove basic auth support from the service and docs.

selfire1 commented 2 years ago

That fixes it. Removing basic auth from the docs would prevent this in the future!