Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T02:52:44.176Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

autofix_pr.yml

143 lines · 5.0 KB · yaml
1# Generated from xtask::workflows::autofix_pr
2# Rebuild with `cargo xtask workflows`.
3name: autofix_pr
4run-name: 'autofix PR #${{ inputs.pr_number }}'
5on:
6  workflow_dispatch:
7    inputs:
8      pr_number:
9        description: pr_number
10        required: true
11        type: string
12      run_clippy:
13        description: run_clippy
14        type: boolean
15        default: 'true'
16permissions:
17  contents: read
18jobs:
19  run_autofix:
20    runs-on: namespace-profile-16x32-ubuntu-2204
21    permissions:
22      contents: read
23      pull-requests: read
24    env:
25      CC: clang
26      CXX: clang++
27    steps:
28    - name: steps::checkout_repo
29      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
30      with:
31        clean: false
32    - name: autofix_pr::run_autofix::checkout_pr
33      run: gh pr checkout "$PR_NUMBER"
34      env:
35        PR_NUMBER: ${{ inputs.pr_number }}
36        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37    - name: steps::setup_cargo_config
38      run: |
39        mkdir -p ./../.cargo
40        cp ./.cargo/ci-config.toml ./../.cargo/config.toml
41    - name: steps::cache_rust_dependencies_namespace
42      uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
43      with:
44        cache: rust
45        path: ~/.rustup
46    - name: steps::setup_linux
47      run: ./script/linux
48    - name: steps::download_wasi_sdk
49      run: ./script/download-wasi-sdk
50    - name: steps::setup_pnpm
51      uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
52      with:
53        version: '9'
54    - name: autofix_pr::run_autofix::install_cargo_machete
55      if: ${{ inputs.run_clippy }}
56      uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9
57      with:
58        tool: cargo-machete@0.7.0
59    - name: autofix_pr::run_autofix::run_cargo_fix
60      if: ${{ inputs.run_clippy }}
61      run: cargo fix --workspace --allow-dirty --allow-staged
62    - name: autofix_pr::run_autofix::run_cargo_machete_fix
63      if: ${{ inputs.run_clippy }}
64      run: cargo machete --fix
65    - name: autofix_pr::run_autofix::run_clippy_fix
66      if: ${{ inputs.run_clippy }}
67      run: cargo clippy --workspace --fix --allow-dirty --allow-staged
68    - name: autofix_pr::run_autofix::run_prettier_fix
69      run: ./script/prettier --write
70    - name: autofix_pr::run_autofix::run_cargo_fmt
71      run: cargo fmt --all
72    - id: create-patch
73      name: autofix_pr::run_autofix::create_patch
74      run: |
75        if git diff --quiet; then
76            echo "No changes to commit"
77            echo "has_changes=false" >> "$GITHUB_OUTPUT"
78        else
79            git diff > autofix.patch
80            echo "has_changes=true" >> "$GITHUB_OUTPUT"
81        fi
82    - name: autofix_pr::upload_patch_artifact
83      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
84      with:
85        name: autofix-patch
86        path: autofix.patch
87        if-no-files-found: ignore
88        retention-days: '1'
89    - name: steps::cleanup_cargo_config
90      if: always()
91      run: |
92        rm -rf ./../.cargo
93    outputs:
94      has_changes: ${{ steps.create-patch.outputs.has_changes }}
95  commit_changes:
96    needs:
97    - run_autofix
98    if: needs.run_autofix.outputs.has_changes == 'true'
99    runs-on: namespace-profile-2x4-ubuntu-2404
100    steps:
101    - id: generate-token
102      name: steps::authenticate_as_zippy
103      uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859
104      with:
105        app-id: ${{ secrets.ZED_ZIPPY_APP_ID }}
106        private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
107        owner: ${{ github.repository_owner }}
108        repositories: ${{ github.event.repository.name }}
109        permission-contents: write
110        permission-workflows: write
111    - name: steps::checkout_repo
112      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
113      with:
114        clean: false
115        token: ${{ steps.generate-token.outputs.token }}
116    - name: autofix_pr::commit_changes::checkout_pr
117      run: gh pr checkout "$PR_NUMBER"
118      env:
119        PR_NUMBER: ${{ inputs.pr_number }}
120        GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
121    - name: autofix_pr::download_patch_artifact
122      uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
123      with:
124        name: autofix-patch
125    - name: autofix_pr::commit_changes::apply_patch
126      run: git apply autofix.patch
127    - name: autofix_pr::commit_changes::commit_and_push
128      run: |
129        git commit -am "Autofix"
130        git push
131      env:
132        GIT_AUTHOR_NAME: zed-zippy[bot]
133        GIT_AUTHOR_EMAIL: 234243425+zed-zippy[bot]@users.noreply.github.com
134        GIT_COMMITTER_NAME: zed-zippy[bot]
135        GIT_COMMITTER_EMAIL: 234243425+zed-zippy[bot]@users.noreply.github.com
136        GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
137concurrency:
138  group: ${{ github.workflow }}-${{ inputs.pr_number }}
139  cancel-in-progress: true
140defaults:
141  run:
142    shell: bash -euxo pipefail {0}
143
Served at tenant.openagents/omega Member data and write actions are omitted.