Skip to content

Commit

Permalink
test auto label
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden committed Nov 20, 2024
1 parent 8f7e104 commit 0ed29a3
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: label PRs

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
auto-label:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check for changes and set labels
id: check_changes
run: |
LABELS=""
if git diff --name-only origin/main...HEAD | grep -q '^relayer/'; then
LABELS="${LABELS}Component: Relayer,"
fi
if git diff --name-only origin/main...HEAD | grep -q '^contracts/'; then
LABELS="${LABELS}Component: Ethereum,"
fi
if git diff --name-only origin/main...HEAD | grep -q '^web/'; then
LABELS="${LABELS}Component: Web,"
fi
if git diff --name-only origin/main...HEAD | grep -q '^docs/'; then
LABELS="${LABELS}Component: Docs,"
fi
if git diff --name-only origin/main...HEAD | grep -q '^smoketest/'; then
LABELS="${LABELS}Component: Smoke Tests,"
fi
if git diff --name-only origin/main...HEAD | grep -q '^control/'; then
LABELS="${LABELS}Component: Control Tool,"
fi
echo "labels=${LABELS%,}" >> $GITHUB_ENV
- name: Add labels to PR
if: env.labels != ''
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: ${{ env.labels }}
2 changes: 2 additions & 0 deletions relayer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,5 @@ As we can see it will cost 0.041163771 DOT as transaction fee and the reward is
For Parachain message relayer take [transaction]( https://dashboard.tenderly.co/snowfork/snowbridge-polkadot/tx/1/0x2dbcf28f8d80c43acd3f08e15b0ec2e3c2c8a929d50e0cba2e3bba5d39738bce) for example:

As we can see it will cost 0.000628 ETH as transaction fee and the reward is 0.000942 ETH, so it's about 0.0003 ETH as incentive for each message.

### Test labels

0 comments on commit 0ed29a3

Please sign in to comment.