PyGithub / PyGithub/PyGithub

Do I need to hardcode my own GPG keys for new UserGPGKey class?

Open
#2,957 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.8k
Forks
1.9k
Avg merge
17m
Merged PRs (30d)
2

Description

Background

I'm developing a UserGPGKey class to expose this library to GitHub's REST API endpoints for GPG keys. The UserGPG class is moduled similar to the already-existing UserKey class. The necessiary modifcations have been made to NamedUser and AuthenticatedUser in order to access GPG keys after authentication.

Problem

In the tests of UserKey, AuthenticatedUser, and NamedUser tests, there is information provived on some SSH keys which from my understanding comes from @jacquev6. Here are screenshots from the codebase showcasing what I am refering to:

tests/UserKey.py
image

tests/AuthenticatedUser.py
image

tests/NamedUser.py
image

What I'd like to know is if I'd need something similar and hardcode information from my own GPG key(s) into the testing code for UserGPGKey?

If possible, I'd like to avoid doing this for privacy reasons.
Thanks in advance for reading this rather lengthy issue! 😅

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing tests/UserKey.py, tests/AuthenticatedUser.py, and tests/NamedUser.py to understand the existing key fixtures and access patterns. Then compare those patterns with the proposed UserGPGKey class and its NamedUser and AuthenticatedUser changes; done should include appropriate tests without requiring the contributor's private GPG key data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.