File tree 1 file changed +30
-1
lines changed
1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 1
- name : Lint Check
1
+ name : Lint Check laravel-PWA
2
2
3
3
on :
4
4
push :
97
97
repo: context.repo.repo,
98
98
body: output
99
99
})
100
+
101
+ - name : Alert for Forked Repositories
102
+ if : github.event.pull_request.head.repo.fork == true
103
+ uses : actions/github-script@v6
104
+ with :
105
+ github-token : ${{ secrets.GITHUB_TOKEN }}
106
+ script : |
107
+ const output = `
108
+ ## ⚠️ This PR is from a Forked Repository
109
+
110
+ Your branch is from a **forked repository**, and it might be outdated compared to the \`main\` branch.
111
+
112
+ Please make sure you have the latest updates from \`main\` before merging.
113
+
114
+ Run the following commands:
115
+ \`\`\`sh
116
+ git remote add upstream https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}.git
117
+ git fetch upstream
118
+ git merge upstream/main
119
+ git push origin HEAD
120
+ \`\`\`
121
+ `;
122
+
123
+ github.rest.issues.createComment({
124
+ issue_number: context.issue.number,
125
+ owner: context.repo.owner,
126
+ repo: context.repo.repo,
127
+ body: output
128
+ })
You can’t perform that action at this time.
0 commit comments