Skip to content

Commit

Permalink
ci(bot): disable bot if not configured on fork (#3542)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeddi authored Jan 17, 2025
1 parent 1d306d6 commit d2813f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ jobs:
define-prs-matrix:
name: Define PRs matrix
# Skip this workflow if:
# - the bot is not configured on this repo/fork
# - the bot is retriggering itself
# - the event is emitted by codecov
# - the event is a review on a pull request from a fork (see save-pr-number job below)
if: |
vars.GH_BOT_LOGIN != '' &&
github.actor != vars.GH_BOT_LOGIN &&
github.actor != 'codecov[bot]' &&
(github.event_name != 'pull_request_review' || github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name)
Expand Down

2 comments on commit d2813f8

@moul
Copy link
Member

@moul moul commented on d2813f8 Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aeddi disable or write a comment that it's not supported?

@aeddi
Copy link
Contributor Author

@aeddi aeddi commented on d2813f8 Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moul Disabled if the owner of the fork has not set up the bot on their fork (so created the right environment variables and secrets).

Knowing that:

  • to be able to create a comment, the bot needs to be configured on the fork.
  • the bot config is strongly tied to the gnolang/gno repo so even if the bot is configured on a fork, most of the rules would cause issues.
  • at the end the changes made on the fork will eventually be tested by the bot when the author opens a PR on the main repo.

Please sign in to comment.