Skip to content

Commit aa8ce7b

Browse files
committed
chore: automatic rebase tests
1 parent fa1ab42 commit aa8ce7b

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed
Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
11
name: Automatic rebase
22

33
on:
4-
workflow_dispatch: ~
5-
push:
6-
branches:
7-
- master
4+
workflow_dispatch: ~
5+
push:
6+
branches:
7+
- master
88

99
jobs:
10-
rebase:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/github-script@v6
14-
with:
15-
script: |
16-
const query = `query($owner:String!, $name:String!, $labels:[String!]) {
17-
repository(owner:$owner, name:$name){
18-
pullRequests(labels: $labels, first: 50) {
19-
nodes {
20-
headRefName
21-
}
22-
}
23-
}
24-
}`;
25-
const variables = {
26-
owner: context.repo.owner,
27-
name: context.repo.repo,
28-
labels: ['Module']
29-
}
30-
const result = await github.graphql(query, variables)
31-
console.log(result.data.repository.pullRequests.nodes)
10+
rebase:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: gh test
15+
run: |
16+
gh pr list --label Module --limit 50
17+
gh codespace create -b my-beautiful-branch --repo ${{ github.repository }}
18+
env:
19+
GH_TOKEN: ${{ secrets.GH_TOKEN }}

bin/conflicts.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
conflicts = $(git diff --check | grep -i conflict)
4+
5+
if [[ $(conflicts) ]]; then
6+
echo "There is conflicts !"
7+
8+
for c in conflicts do
9+
echo c >> rebase.md
10+
done
11+
else
12+
echo "No conflicts"
13+
fi

0 commit comments

Comments
 (0)