Skip to content

Commit

Permalink
Update alternate-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ash17290 authored Apr 4, 2024
1 parent eda6046 commit 71546eb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/alternate-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,18 @@ jobs:
)
) {
// Add comment to PR if the bot doesn't have permissions to update the PR
const comment = `@${context.actor} I don't have permissions to update this PR. Please ask the PR author to check the "Allow edits from maintainers" checkbox in the PR settings.`;
const comment = `@${context.actor} The updation of PR has failed. It can be due to one of the following reasons:
- I don't have permissions to update this PR. To update your fork with upstream using bot you need to to enable [Allow edits from maintainers](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) option in the PR.
- Another possible reason for failure can due to the fork being in an organisation and not under a user.
- The fork is located in an organization, not under your personal profile.
- There is a conflict in the PR. Please resolve the conflict and try again.`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: comment
});
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down

0 comments on commit 71546eb

Please sign in to comment.