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 python -m python.gitea_flake_lock merge
--repo "${{ github.repository }}" --repo "${{ github.repository }}"
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} JEEVES_BOT_TOKEN: ${{ secrets.JEEVES_BOT_TOKEN }}
GITEA_URL: https://gitea.tmmworkshop.com GITEA_URL: https://gitea.tmmworkshop.com
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
run: nix flake update run: nix flake update
- name: Create or update flake.lock PR - name: Create or update flake.lock PR
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} JEEVES_BOT_TOKEN: ${{ secrets.JEEVES_BOT_TOKEN }}
GITEA_URL: https://gitea.tmmworkshop.com GITEA_URL: https://gitea.tmmworkshop.com
run: >- run: >-
nix develop .#devShells.x86_64-linux.default -c 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"]) 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.""" """Read the required Gitea token from the environment."""
token = getenv("GITEA_TOKEN") token = getenv("JEEVES_BOT_TOKEN")
if token: if token:
return token return token
msg = "GITEA_TOKEN environment variable is required" msg = "JEEVES_BOT_TOKEN environment variable is required"
raise RuntimeError(msg) raise RuntimeError(msg)
@@ -111,7 +111,7 @@ def update(
owner, repo_name = split_repo_name(repo) owner, repo_name = split_repo_name(repo)
with GiteaClient( with GiteaClient(
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL), base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
token=_required_gitea_token(), token=_required_jeeves_bot_token(),
) as client: ) as client:
pull_request = ensure_flake_lock_pull_request( pull_request = ensure_flake_lock_pull_request(
client, client,
@@ -134,7 +134,7 @@ def merge(
owner, repo_name = split_repo_name(repo) owner, repo_name = split_repo_name(repo)
with GiteaClient( with GiteaClient(
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL), base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
token=_required_gitea_token(), token=_required_jeeves_bot_token(),
) as client: ) as client:
pull_request = find_flake_lock_pull_request(client, owner=owner, repo=repo_name) pull_request = find_flake_lock_pull_request(client, owner=owner, repo=repo_name)
if not pull_request: if not pull_request: