Skip to content

Commit f5fcf07

Browse files
Merge pull request #8823 from finenamol-link11/master
ci: simplify conflict hint comment and post as fineanmol
2 parents da306f5 + 7723e6e commit f5fcf07

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/pr-automation.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ permissions:
1111
jobs:
1212
hint:
1313
runs-on: ubuntu-latest
14-
if: github.repository == 'fineanmol/Hacktoberfest2025'
1514
steps:
1615
- name: Comment on conflicting PRs
1716
uses: actions/github-script@v7
1817
with:
19-
github-token: ${{ secrets.GITHUB_TOKEN }}
18+
github-token: ${{ secrets.AUTOMERGE_TOKEN }}
2019
script: |
2120
const pr = context.payload.pull_request;
2221
const { data: fresh } = await github.rest.pulls.get({
@@ -29,7 +28,7 @@ jobs:
2928
return;
3029
}
3130
32-
const marker = '<!-- hacktoberfest-conflict-hint -->';
31+
const marker = '<!-- merge-conflict-hint -->';
3332
const { data: comments } = await github.rest.issues.listComments({
3433
owner: context.repo.owner,
3534
repo: context.repo.repo,
@@ -41,16 +40,15 @@ jobs:
4140
return;
4241
}
4342
43+
const baseBranch = pr.base.ref;
4444
const body = [
4545
marker,
4646
'🔧 **Merge conflicts detected**',
4747
'',
4848
'To fix:',
49-
'1. `git fetch upstream` and merge latest `master` into your branch',
49+
`1. \`git fetch upstream\` and merge latest \`${baseBranch}\` into your branch`,
5050
'2. Resolve conflicts locally',
5151
'3. Push your branch — we will merge once it is clean',
52-
'',
53-
'**Contributor lists:** keep **Anmol Agarwal (fineanmol)** as the first entry; add new contributors at the **end** of `contributors/contributorsList1.js` or `contributors/contributorslist.js`.',
5452
].join('\n');
5553
5654
await github.rest.issues.createComment({

0 commit comments

Comments
 (0)