Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action not running on PRs from Forked repos #24

Closed
Matticusau opened this issue Jul 3, 2020 · 2 comments
Closed

Action not running on PRs from Forked repos #24

Matticusau opened this issue Jul 3, 2020 · 2 comments
Labels
bug Something isn't working enhancement New feature or request planned On our roadmap work started

Comments

@Matticusau
Copy link
Owner

Bug Report

Current Behavior
When a PR is raised from a Fork of a Repo the GitHub Action is not triggered. Once the PR is open and a comment is made then there is evidence that the action executes.

To Reproduce
Steps to reproduce the behavior:

  1. For a repo which has this action configured
  2. Create some changes and submit a PR to propose the changes back to the base repo
  3. No action will be executed
  4. Add a comment to the PR
  5. The Action will be run as seen in the actions tab.

Expected behavior/code
Expecting the action to execute when opened from a fork of the repository

Additional context/Screenshots

Most relevant info seems to be in https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositories

When you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.

There does some to be some history of this.
https://github.community/t/actions-not-working-correctly-for-forks/16649
https://github.community/t/run-a-github-action-on-pull-request-for-pr-opened-from-a-forked-repo/16054

Webhook may have some extra info we can use for say tracking other post create events and then checking if it is a fork and taking some additional actions: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#pull_request

I think the current behavior I have witnessed may actually be related to private-vs-public repos. I believe this is supported in public repos but not in private repos/forks.

Again from https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositories

Note: Workflows do not run on private base repositories when you open a pull request from a forked repository.
@Matticusau Matticusau added bug Something isn't working needs triage New issues which need to be triaged labels Jul 3, 2020
@Matticusau
Copy link
Owner Author

As this is not supported by GitHub the current plan will be to expand on the schedule support. Need to include

  • Label automation
  • Review automation
  • Update Merge automation with recent changes

Future consideration

  • Welcome handler will not be added at this time as it will require additional checks to see if the message is already added (rather than current check on status of PR).

@Matticusau Matticusau added enhancement New feature or request planned On our roadmap and removed needs triage New issues which need to be triaged labels Jul 24, 2020
Matticusau added a commit that referenced this issue Jul 27, 2020
Matticusau added a commit that referenced this issue Jul 27, 2020
* suggested label colors

* Fixes require zero requested changes #16

* Fixes #17

* Auto Merge Filter feature (#18)

* Initial filtering support #15

* Added glob processing #15

* logging

* json pattern conversion

* lets just expect the json object

* logging

* Removed need to match ALL globs

* removed some logging

* Updated docs for #15

* Improve class constructors efficiency

* Reviewer patch 1 (#20)

* Retrieves the raw file data

* Extracts the custom key from the YAML front matter

* Adds reviewers to a pull request from any modified file

* YAML front matter is taken from the Pull Requests base, not the pull request to ensure people cannot overwrite this value

* supports enable/disable and custom key

* Added delete branch functionality #14

* Skip new files #19

* added branch delete deny #14

* config spelling

* branch head ref

* logging clean up

* Docs and renamed config value

* Label handler ondemand /  onschedule #24

* logging

* logging

* logging

* logging

* added ondemand onschedule for label handler Action not running on PRs from Forked repos #24

* Logic changes for ondemand vs onschedule #24

* review on schedule #24 & intitial author yaml #23

* added length check #23

* Jekyll author file lookup #23

* Added action params

* corrected prreviewer-authorfilepath param #23

* logging

* added ref param

* logging

* Hanlding of empty author key

* extra check for github username

* get raw author file

* logging

* path update

* logging

* loggin

* logging

* removed check for author object length

* removing debug logging

* review on schedule

* Feature preview of #23 and #24

* docs update

* docs - link to issue in known issue

* Added check for auto merge label #28
@Matticusau
Copy link
Owner Author

Released with this functionality

  • Label automation
  • Review automation
  • Update Merge automation with recent changes

Future consideration

  • Welcome handler will not be added at this time as it will require additional checks to see if the message is already added (rather than current check on status of PR).

Matticusau added a commit that referenced this issue Jun 14, 2021
* suggested label colors

* Fixes require zero requested changes #16

* Fixes #17

* Auto Merge Filter feature (#18)

* Initial filtering support #15

* Added glob processing #15

* logging

* json pattern conversion

* lets just expect the json object

* logging

* Removed need to match ALL globs

* removed some logging

* Updated docs for #15

* Improve class constructors efficiency

* Reviewer patch 1 (#20)

* Retrieves the raw file data

* Extracts the custom key from the YAML front matter

* Adds reviewers to a pull request from any modified file

* YAML front matter is taken from the Pull Requests base, not the pull request to ensure people cannot overwrite this value

* supports enable/disable and custom key

* Added delete branch functionality #14

* Skip new files #19

* added branch delete deny #14

* config spelling

* branch head ref

* logging clean up

* Docs and renamed config value

* Label handler ondemand /  onschedule #24

* logging

* logging

* logging

* logging

* added ondemand onschedule for label handler Action not running on PRs from Forked repos #24

* Logic changes for ondemand vs onschedule #24

* review on schedule #24 & intitial author yaml #23

* added length check #23

* Jekyll author file lookup #23

* Added action params

* corrected prreviewer-authorfilepath param #23

* logging

* added ref param

* logging

* Hanlding of empty author key

* extra check for github username

* get raw author file

* logging

* path update

* logging

* loggin

* logging

* removed check for author object length

* removing debug logging

* review on schedule

* Feature preview of #23 and #24

* docs update

* docs - link to issue in known issue

* Added check for auto merge label #28

* Initial fix for undefined author #30

* logging

* logging

* frontmatter attributes test logic

* testing frontmatter.attributes

* clean up

* PR author not reviewer #32

* Testing PR Author review

* Testing the PR Author vs Reviewer

* Extra logging

* force login check to lowercase

* Fixes #32

* Support for #37 #35 #15

* Only support modified files for now #35

* Extending handling of Not Found error #35

* fix addLabel and API efficiency #41

* initial logic for owner review bypass #36

* docs #36

* action config

* debug info

* debug info

* logic improvement

* debug info

* updated docs

* change log

* fixing node-notifier dependabot update

* debug info for checks test

* workflow_run support #50

* 1.3.0

* release instructions

* Releasing v1.3.0
Matticusau added a commit that referenced this issue May 18, 2022
* suggested label colors

* Fixes require zero requested changes #16

* Fixes #17

* Auto Merge Filter feature (#18)

* Initial filtering support #15

* Added glob processing #15

* logging

* json pattern conversion

* lets just expect the json object

* logging

* Removed need to match ALL globs

* removed some logging

* Updated docs for #15

* Improve class constructors efficiency

* Reviewer patch 1 (#20)

* Retrieves the raw file data

* Extracts the custom key from the YAML front matter

* Adds reviewers to a pull request from any modified file

* YAML front matter is taken from the Pull Requests base, not the pull request to ensure people cannot overwrite this value

* supports enable/disable and custom key

* Added delete branch functionality #14

* Skip new files #19

* added branch delete deny #14

* config spelling

* branch head ref

* logging clean up

* Docs and renamed config value

* Label handler ondemand /  onschedule #24

* logging

* logging

* logging

* logging

* added ondemand onschedule for label handler Action not running on PRs from Forked repos #24

* Logic changes for ondemand vs onschedule #24

* review on schedule #24 & intitial author yaml #23

* added length check #23

* Jekyll author file lookup #23

* Added action params

* corrected prreviewer-authorfilepath param #23

* logging

* added ref param

* logging

* Hanlding of empty author key

* extra check for github username

* get raw author file

* logging

* path update

* logging

* loggin

* logging

* removed check for author object length

* removing debug logging

* review on schedule

* Feature preview of #23 and #24

* docs update

* docs - link to issue in known issue

* Added check for auto merge label #28

* Initial fix for undefined author #30

* logging

* logging

* frontmatter attributes test logic

* testing frontmatter.attributes

* clean up

* PR author not reviewer #32

* Testing PR Author review

* Testing the PR Author vs Reviewer

* Extra logging

* force login check to lowercase

* Fixes #32

* Support for #37 #35 #15

* Only support modified files for now #35

* Extending handling of Not Found error #35

* fix addLabel and API efficiency #41

* initial logic for owner review bypass #36

* docs #36

* action config

* debug info

* debug info

* logic improvement

* debug info

* updated docs

* change log

* fixing node-notifier dependabot update

* debug info for checks test

* workflow_run support #50

* 1.3.0

* release instructions

* Releasing v1.3.0

* reviewer error handling #55

* 1.3.1

* update typescript

* preparing release

* troubleshooting #59

* 1.3.2

* release v1.3.2

* release notes

* extra error logging

* 1.3.3

* v1.3.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request planned On our roadmap work started
Projects
None yet
Development

No branches or pull requests

1 participant