mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-05-30 18:13:54 +08:00
with waynes env
This commit is contained in:
6
.github/workflows/commentResult.js
vendored
6
.github/workflows/commentResult.js
vendored
@@ -5,15 +5,12 @@ async function main() {
|
||||
const [, , log, author, repo, pr, path, token] = process.argv;
|
||||
const file = readFileSync(log, 'utf-8');
|
||||
|
||||
// only show the summary TVL cos the comments could end up long
|
||||
const summaryIndex = file.indexOf('------ TVL ------');
|
||||
if (summaryIndex == -1) {
|
||||
return;
|
||||
};
|
||||
|
||||
console.log('JUNK:')
|
||||
console.log(token)
|
||||
const response = await axios.post(
|
||||
await axios.post(
|
||||
`https://api.github.com/repos/${author}/${repo}/issues/${pr}/comments`,
|
||||
{
|
||||
body: `The adapter at ${path} exports TVL:
|
||||
@@ -24,6 +21,5 @@ async function main() {
|
||||
Accept: 'application/vnd.github.v3+json'
|
||||
}
|
||||
});
|
||||
console.log(response)
|
||||
};
|
||||
main();
|
||||
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -14,13 +14,12 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
- name: Run changes files through test script
|
||||
run: |
|
||||
echo ${{ secrets.JUNK_SECRET }}
|
||||
npm install
|
||||
for i in $(echo ${{ steps.file_changes.outputs.files_modified}} | tr -d '[]' | tr "," "\n")
|
||||
do
|
||||
{
|
||||
node ${{ github.workspace }}/test.js ${{ github.workspace }}/${i} > output.txt
|
||||
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} ${{ secrets.JUNK_SECRET }}
|
||||
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} ${{ secrets.TESTER_KEY }}
|
||||
} || {
|
||||
echo -n $i
|
||||
echo ' doesnt run'
|
||||
@@ -30,7 +29,7 @@ jobs:
|
||||
do
|
||||
{
|
||||
node ${{ github.workspace }}/test.js ${{ github.workspace }}/${i} > output.txt
|
||||
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} ${{ secrets.JUNK_SECRET }}
|
||||
node ${{ github.workspace }}/.github/workflows/commentResult.js /home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/output.txt "${{ github.repository_owner }}" "${{ github.event.repository.name }}" "${{ github.event.number }}" ${i} ${{ secrets.TESTER_KEY }}
|
||||
} || {
|
||||
echo -n $i
|
||||
echo ' doesnt run'
|
||||
|
||||
Reference in New Issue
Block a user