Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Feb 13, 2024
1 parent 659ec67 commit fa472a2
Show file tree
Hide file tree
Showing 11 changed files with 306 additions and 389 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/continuous-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,32 @@ on:
- completed

jobs:
get-default-branch:
runs-on: ubuntu-latest
outputs:
isDefault: ${{ steps.check.outputs.isDefault }}
steps:
- name: Check if current branch is default
id: check
run: |
DEFAULT_BRANCH=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }} | jq -r '.default_branch')
IS_DEFAULT=false
if [ "$DEFAULT_BRANCH" = "${{ github.ref }}" ]; then
IS_DEFAULT=true
fi
echo "::set-output name=isDefault::$IS_DEFAULT"
deploy-to-cloudflare:
name: Deploy to Cloudflare Pages
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ubiquity/.github/.github/workflows/deploy.yml@main
with:
deploy_preview_branches: ${{ needs.get-default-branch.outputs.isDefault }}
permissions:
contents: read
pull-requests: write
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
125 changes: 64 additions & 61 deletions static/audit.html
Original file line number Diff line number Diff line change
@@ -1,70 +1,73 @@
<!DOCTYPE html>
<html>
<head>
<title>Audit report</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="out/styles/audit-report/audit.css" rel="stylesheet" />
</head>

<head>
<title>Audit report</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="out/styles/audit-report/audit.css" rel="stylesheet" />
</head>

<body>
<div class="container">
<h1 class="audit-tag">Audit report</h1>
<!-- params -->
<div class="mb-3">
<label for="botWalletAddress" class="form-label">Bot wallet address</label>
<input type="text" class="form-control" id="botWalletAddress" />
</div>
<div class="mb-3">
<label for="repoURLs" class="form-label">Repository URLs</label>
<input type="text" class="form-control" id="repoURLs" />
</div>
<div class="mb-3">
<label for="githubPAT" class="form-label">Github Personal Access Token</label>
<input type="text" class="form-control" id="githubPAT" />
</div>
<div class="mb-3">
<label for="quickName" class="form-label">Quick Import</label>
<textarea type="text" class="form-control" id="quickName" placeholder='
<body>
<div class="container">
<h1 class="audit-tag">Audit report</h1>
<!-- params -->
<div class="mb-3">
<label for="botWalletAddress" class="form-label">Bot wallet address</label>
<input type="text" class="form-control" id="botWalletAddress" />
</div>
<div class="mb-3">
<label for="repoURLs" class="form-label">Repository URLs</label>
<input type="text" class="form-control" id="repoURLs" />
</div>
<div class="mb-3">
<label for="githubPAT" class="form-label">Github Personal Access Token</label>
<input type="text" class="form-control" id="githubPAT" />
</div>
<div class="mb-3">
<label for="quickName" class="form-label">Quick Import</label>
<textarea
type="text"
class="form-control"
id="quickName"
placeholder='
{
"WALLET": "",
"REPO": "",
"PAT": ""
}'></textarea>
</div>
<div class="btn-container">
<button type="button" class="btn btn-primary mb-3" id="getReport">
<span class="btn-loader" id="report-loader"></span>
<span>Get report</span>
</button>
<div class="tg-list-item">
<input class="tgl tgl-flat" id="cb4" type="checkbox" />
<label class="tgl-btn" for="cb4"></label>
<div class="cache-title">⚡Cache</div>
}'
></textarea>
</div>
<div class="btn-container">
<button type="button" class="btn btn-primary mb-3" id="getReport">
<span class="btn-loader" id="report-loader"></span>
<span>Get report</span>
</button>
<div class="tg-list-item">
<input class="tgl tgl-flat" id="cb4" type="checkbox" />
<label class="tgl-btn" for="cb4"></label>
<div class="cache-title">⚡Cache</div>
</div>
</div>
<!-- result table -->
<div class="resultContainer">
<input type="text" id="searchInput" placeholder="Filter Result" />
<table id="resultTable" class="table" style="display: none">
<thead>
<tr>
<th scope="col">Organization/Repo Name</th>
<th scope="col">Issue URL</th>
<th scope="col">Bounty Hunter</th>
<th scope="col" id="amountHeader">Amount <span id="sortArrow">&#8595;</span></th>
<th scope="col">TX URL</th>
</tr>
</thead>
<tbody>
<!-- table content -->
</tbody>
</table>
</div>
</div>
<!-- result table -->
<div class="resultContainer">
<input type="text" id="searchInput" placeholder="Filter Result">
<table id="resultTable" class="table" style="display: none">
<thead>
<tr>
<th scope="col">Organization/Repo Name</th>
<th scope="col">Issue URL</th>
<th scope="col">Bounty Hunter</th>
<th scope="col" id="amountHeader">Amount <span id="sortArrow">&#8595;</span></th>
<th scope="col">TX URL</th>
</tr>
</thead>
<tbody>
<!-- table content -->
</tbody>
</table>
</div>
</div>
<ul class="notifications"></ul>
<script src="out/scripts/audit-report/audit.js" type="application/javascript"></script>
</body>

</html>
<ul class="notifications"></ul>
<script src="out/scripts/audit-report/audit.js" type="application/javascript"></script>
</body>
</html>
Loading

0 comments on commit fa472a2

Please sign in to comment.