with waynes env

This commit is contained in:
waynebruce0x
2022-03-15 13:39:18 +00:00
parent 8363329340
commit c4c0de07b0
2 changed files with 3 additions and 8 deletions

View File

@@ -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();

View File

@@ -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'