Skip to content

Commit 8e5b016

Browse files
authored
Merge branch 'main' into release-dev/elip5-token-upgrade
2 parents 379255d + 38b1efb commit 8e5b016

File tree

2 files changed

+73
-16
lines changed

2 files changed

+73
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Rebase release-dev/* onto main
2+
3+
on:
4+
schedule:
5+
- cron: "0 20 * * *" # 8pm UTC daily, 1pm EST daily
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
rebase-release-dev:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
18+
- name: Setup Git
19+
run: |
20+
git config user.name "GitHub Actions"
21+
git config user.email "[email protected]"
22+
23+
- name: Fetch all branches
24+
run: git fetch origin "+refs/heads/*:refs/remotes/origin/*"
25+
26+
- name: Rebase each release-dev/* branch onto main
27+
run: |
28+
for branch in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin/release-dev/*); do
29+
echo "Processing $branch"
30+
bname=$(basename $branch)
31+
git checkout -B $bname $branch
32+
git rebase origin/main || {
33+
echo "Rebase failed for $bname. Skipping push."
34+
continue
35+
}
36+
git push origin $bname
37+
done
38+

CONTRIBUTING.md

+35-16
Original file line numberDiff line numberDiff line change
@@ -136,41 +136,60 @@ upstream https://github.com/Layr-Labs/eigenlayer-contracts.git (fetch)
136136
upstream https://github.com/Layr-Labs/eigenlayer-contracts.git (push)
137137
```
138138

139-
### Make Sure Your Fork Is In Sync With Upstream
140139

141-
Go to `main` branch in your fork repository
140+
### Create Your PR to Upstream Branches
141+
142+
The following applies if you submit a PR to upstream branch of either `main` or `release-dev/*`, which will refer to as `<upstream-target-branch>`
143+
144+
Create a local branch from the upstream branch:
142145

143146
```
144-
git checkout main
147+
git checkout -B <my-local-feature-branch> upstream/<upstream-target-branch>
145148
```
146149

147-
Fetch latest update from upstream
150+
Make your changes, then commit:
148151

149152
```
150-
git fetch upstream
153+
git add .
154+
git commit -m "your message"
151155
```
152156

153-
Rebase your `main` to the upstream `main`
157+
Push to your fork:
154158

155159
```
156-
git rebase upstream/main
160+
git push -u origin <my-local-feature-branch>
157161
```
158162

159-
Push to your fork repository
163+
Go to GitHub, and open a PR from:
160164

161165
```
162-
git push
166+
your-fork:<my-local-feature-branch>
167+
**to**
168+
Layr-Labs/eigenlayer-contracts:<upstream-target-branch>
163169
```
164170

165-
Now `main` in your fork repository should match the `main` in EigenLayer repository.
171+
GitHub should auto-detect this if branches match.
172+
173+
If you already have an open PR for this branch, just push more commits to `<my-local-feature-branch>`, and the PR will update.
174+
175+
176+
### Keeping Your Branch Updated With Upstream
177+
178+
To stay in sync with upstream's `<upstream-target-branch>`, whether it's `main` or `release-dev/*`:
179+
180+
```
181+
git fetch upstream
182+
git checkout <my-local-feature-branch>
183+
git rebase upstream/<upstream-target-branch>
184+
185+
# or use merge if you prefer
186+
# git merge upstream/<upstream-target-branch>
187+
188+
git push -f origin <my-local-feature-branch>
189+
```
166190

167-
### Create Your PR
191+
Use --force only if you're rebasing (not with merges).
168192

169-
1. Create a new branch from your target upstream branch in your fork repository
170-
2. Make your code changes
171-
3. Commit your changes
172-
4. Push to your forked repository
173-
5. Create a PR from your branch to the appropriate branch in the upstream repository
174193

175194
### PR Title Format
176195

0 commit comments

Comments
 (0)