guibranco / gstraccini-bot-service

🤖 :octocat: GStraccini-bot automates repository management, ensuring organization and health by handling pull requests, issues, comments, and commits.
https://gstraccini.bot
MIT License
2 stars 0 forks source link

[BUG] Check if actions requested to checkout the repository are not in a external pull request #93

Open guibranco opened 11 months ago

guibranco commented 11 months ago

Description of the Bug

When attempting to run the @gstraccini csharpier command on a pull request (PR) originating from a forked repository, the bot tries to checkout the PR branch from the original repository instead of the fork. This causes the action to fail.

Expected Behavior

If the PR comes from a forked repository, the bot should recognize this and respond with a comment stating that it cannot perform the action due to the lack of permissions to checkout from the forked repository.

Steps to Reproduce

  1. Submit a pull request from a forked repository.
  2. Run the @gstraccini csharpier command on the PR.
  3. Observe that the bot attempts to checkout the branch from the original repository instead of the fork.

Actual Behavior

The bot attempts to checkout the branch from the original repository, leading to a failed action. No error message or explanation is provided to indicate that the PR comes from a fork.

Proposed Solution

The bot should detect when a PR is from a forked repository and automatically comment on the PR explaining that it cannot perform the action due to a lack of access to the forked repository.

gitauto-ai[bot] commented 1 month ago

Hey, I'm a bit lost here! Not sure which file I should be fixing. Could you give me a bit more to go on? Maybe add some details to the issue or drop a comment with some extra hints? Thanks!

Have feedback or need help? Feel free to email info@gitauto.ai.