feat(gitea): replace GITEA_TOKEN with JEEVES_BOT_TOKEN in workflows and script #65

Merged
Richie merged 1 commits from feature/testing-jeeves-bot-account into main 2026-08-29 18:08:10 -04:00
3 changed files with 7 additions and 7 deletions
@@ -19,5 +19,5 @@ jobs:
python -m python.gitea_flake_lock merge
--repo "${{ github.repository }}"
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
JEEVES_BOT_TOKEN: ${{ secrets.JEEVES_BOT_TOKEN }}
GITEA_URL: https://gitea.tmmworkshop.com
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
run: nix flake update
- name: Create or update flake.lock PR
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
JEEVES_BOT_TOKEN: ${{ secrets.JEEVES_BOT_TOKEN }}
GITEA_URL: https://gitea.tmmworkshop.com
run: >-
nix develop .#devShells.x86_64-linux.default -c
+5 -5
View File
@@ -84,13 +84,13 @@ def push_branch(*, branch: str) -> None:
run_cmd(["git", "push", "origin", f"HEAD:{branch}", "--force"])
def _required_gitea_token() -> str:
def _required_jeeves_bot_token() -> str:
"""Read the required Gitea token from the environment."""
token = getenv("GITEA_TOKEN")
token = getenv("JEEVES_BOT_TOKEN")
if token:
return token
msg = "GITEA_TOKEN environment variable is required"
msg = "JEEVES_BOT_TOKEN environment variable is required"
raise RuntimeError(msg)
@@ -111,7 +111,7 @@ def update(
owner, repo_name = split_repo_name(repo)
with GiteaClient(
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
token=_required_gitea_token(),
token=_required_jeeves_bot_token(),
) as client:
pull_request = ensure_flake_lock_pull_request(
client,
@@ -134,7 +134,7 @@ def merge(
owner, repo_name = split_repo_name(repo)
with GiteaClient(
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
token=_required_gitea_token(),
token=_required_jeeves_bot_token(),
) as client:
pull_request = find_flake_lock_pull_request(client, owner=owner, repo=repo_name)
if not pull_request: