Skip to content

Commit 0ed29a3

Browse files
test auto label
1 parent 8f7e104 commit 0ed29a3

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/labels.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: label PRs
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
auto-label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
14+
- name: Check for changes and set labels
15+
id: check_changes
16+
run: |
17+
LABELS=""
18+
19+
if git diff --name-only origin/main...HEAD | grep -q '^relayer/'; then
20+
LABELS="${LABELS}Component: Relayer,"
21+
fi
22+
if git diff --name-only origin/main...HEAD | grep -q '^contracts/'; then
23+
LABELS="${LABELS}Component: Ethereum,"
24+
fi
25+
if git diff --name-only origin/main...HEAD | grep -q '^web/'; then
26+
LABELS="${LABELS}Component: Web,"
27+
fi
28+
if git diff --name-only origin/main...HEAD | grep -q '^docs/'; then
29+
LABELS="${LABELS}Component: Docs,"
30+
fi
31+
if git diff --name-only origin/main...HEAD | grep -q '^smoketest/'; then
32+
LABELS="${LABELS}Component: Smoke Tests,"
33+
fi
34+
if git diff --name-only origin/main...HEAD | grep -q '^control/'; then
35+
LABELS="${LABELS}Component: Control Tool,"
36+
fi
37+
38+
echo "labels=${LABELS%,}" >> $GITHUB_ENV
39+
40+
- name: Add labels to PR
41+
if: env.labels != ''
42+
uses: actions-ecosystem/action-add-labels@v1
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
labels: ${{ env.labels }}

relayer/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,5 @@ As we can see it will cost 0.041163771 DOT as transaction fee and the reward is
136136
For Parachain message relayer take [transaction]( https://dashboard.tenderly.co/snowfork/snowbridge-polkadot/tx/1/0x2dbcf28f8d80c43acd3f08e15b0ec2e3c2c8a929d50e0cba2e3bba5d39738bce) for example:
137137

138138
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.
139+
140+
### Test labels

0 commit comments

Comments
 (0)