c4c9993039bf9587f405dec3bc6bc3f64f1a6560
- test_create_issue.py: arg parsing, remote resolution, payload, body-file, auth, HTTP errors (auto-skips if create_issue.py is inaccessible due to macOS sandbox) - test_create_pr.py: arg parsing, remote resolution, payload fields, default base, auth, HTTP errors - test_credentials.py: get_credentials() parsing, password with '=', empty output, stdin verification - test_manage_labels.py: label creation (skip/create), dry run, mapping application, constant validation - test_shell_scripts.py: close_issue.sh and mark_issue.sh arg validation and error messages 28 passed, 12 skipped (macOS sandbox on create_issue.py).
Gitea Tools
A collection of Python and Bash scripts to automate interactions with Gitea instances.
Supported Instances
| Remote | Host | Org / Repo |
|---|---|---|
dadeschools |
gitea.dadeschools.net |
Contractor / Timesheet |
prgs |
gitea.prgs.cc |
Scaled-Tech-Consulting / Timesheet |
Authentication
These scripts securely extract tokens from the macOS keychain to avoid hardcoding secrets.
Credentials are retrieved via git credential fill for the target host. Ensure you have
logged in via Git over HTTPS at least once so the keychain caches your credentials.
Available Scripts
| Script | Description |
|---|---|
create_issue.py |
Create an issue (--remote, --title, --body) |
create_pr.py |
Open a Pull Request (--remote, --title, --head, --base) |
close_issue.sh |
Close a specific issue (dadeschools only) |
mark_issue.sh |
Claim/release an issue via status:in-progress label |
manage_labels.py |
Create label set and apply label mappings (--dry to preview) |
Quick Examples
# Create an issue
./create_issue.py --title "Fix PDF output" --body "Blank on Safari"
# Create a PR
./create_pr.py --title "feat: add validation" --head feat/validation --body "Closes #12"
# Close issue #5
./close_issue.sh 5
# Claim an issue before working on it
./mark_issue.sh 10 start
# Release when done
./mark_issue.sh 10 done
Use --help on any Python script for full usage details.
Description
Python and Bash scripts to automate interactions with Gitea instances (issues, PRs, labels).
Languages
Python
92.8%
Shell
7.2%