Skip to content

Commit

Permalink
update gha comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed May 28, 2024
1 parent 12e9fac commit c42ea8a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/comment_wrong_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const output = `
Warning: we only accept PRs to the \`dev\` branch. It looks like you've created a PR to the \`main\` branch. Please edit this PR and select the \`dev\` branch as the target branch instead. If this was intentional please ignore this message.
`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Warning: we only accept PRs to the \`dev\` branch. It looks like you've created a PR to the \`main\` branch. Please edit this PR and select the \`dev\` branch as the target branch instead. If this was intentional please ignore this message.'
body: output
})
comment_warning_internal_pr:
Expand All @@ -33,9 +37,13 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const output = `
Warning: we only accept PRs to main from the \`dev\` branch. It looks like you've created a PR from a different branch. Please edit this PR and select the \`dev\` branch as the source branch instead. If this was intentional please ignore this message.
`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Warning: we only accept PRs to main from the \`dev\` branch. It looks like you've created a PR from a different branch. Please edit this PR and select the \`dev\` branch as the source branch instead. If this was intentional please ignore this message.'
body: output
})

0 comments on commit c42ea8a

Please sign in to comment.