ObjGithub is the GitHub Issues integration object for Axion.
It provides:
issues, comments, optional events)Module: factory.core/ObjGithub.py
YAML queries: factory.core/ObjGithub.yaml
Primary tests: resource.test/pytests/factory.core/test_ObjGithub.py
ObjGithub reads values from config.yaml:
github:
token: "YOUR_TOKEN"
owner: "Technocore-SA"
repo: "Axion"
api_version: "2022-11-28"
base_url: "https://api.github.com"
timeout: 30
user_agent: "axion-objgithub"
ObjGithub uses enums from ObjEnum.py for safety and normalization:
GithubIssueStateGithubIssueSortGithubIssueCommentSortGithubIssueDirectionGithubIssueStateReasonTicketPriorityTicketTypeRequestedByTypeTicketStatusThese enums are used for:
Invalid enum values raise clear ValueError messages.
ObjGithub does not keep SQL inline for ticket lookups.
The issue-marker lookup query is externalized in:
factory.core/ObjGithub.yaml
Query key:
find_ticket_guid_by_github_markerUsed by:
ObjGithub.find_ticket_guid_by_issue_number(...)This keeps SQL in YAML and logic in Python, aligned with existing object patterns.
Show all commands:
PYTHONPATH=/root/axion/factory.core dev-env/bin/python factory.core/ObjGithub.py --help
Common commands:
PYTHONPATH=/root/axion/factory.core dev-env/bin/python factory.core/ObjGithub.py test-auth
PYTHONPATH=/root/axion/factory.core dev-env/bin/python factory.core/ObjGithub.py list-issues --owner Technocore-SA --repo Axion --state all --per-page 20
PYTHONPATH=/root/axion/factory.core dev-env/bin/python factory.core/ObjGithub.py get-issue 123 --owner Technocore-SA --repo Axion
PYTHONPATH=/root/axion/factory.core dev-env/bin/python factory.core/ObjGithub.py add-comment 123 "Synced to internal ticket" --owner Technocore-SA --repo Axion
Import all issues into ticket tables:
PYTHONPATH=/root/axion/factory.core dev-env/bin/python factory.core/ObjGithub.py import-issues-to-tickets --owner Technocore-SA --repo Axion --state all
Dry run import:
PYTHONPATH=/root/axion/factory.core dev-env/bin/python factory.core/ObjGithub.py import-issues-to-tickets --owner Technocore-SA --repo Axion --state all --dry-run
import-issues-to-tickets:
[GH#<issue_number>]ObjTicket APIs for create/assign/close operationsSystemId for ticket routing and saves it to data_ticket.ServerId
system:<id>, system-id:<id>, server:<id>, sys:<id>SystemId: <id>, System ID: <id>, markdown table row | SystemId | <id> |Run ObjGithub tests:
dev-env/bin/py.test -q resource.test/pytests/factory.core/test_ObjGithub.py
The test suite covers: