Skip to content

Conversation

ctcpip
Copy link
Contributor

@ctcpip ctcpip commented Aug 7, 2025

fork PRs targeting main will never be able to pass integration tests or action-in-action due to the lack of permissions that fork action/workflow get:

  • it will not have write permission on the main repo
  • it will not have write permission on the wesleytodd/meeting-maker repo
  • it will not have write permission on its own repo because it's running in the main repo context

therefore, if you want to see the integration tests and action-in-action test passing, then a PR needs to be created in the fork repo

tests passing in the fork repo: ctcpip#25

@ctcpip ctcpip force-pushed the forkadu branch 8 times, most recently from a29282d to e8890ac Compare August 7, 2025 20:57
fork PRs targeting main will never be able to pass integration tests or action-in-action due to the lack of permissions that fork action/workflow get:

- it will not have write permission on the main repo
- it will not have write permission on the wesleytodd/meeting-maker repo
- it will not have write permission on its own repo because it's running in the main repo context

therefore, if you want to see the integration tests and action-in-action test passing, then a PR needs to be created in the fork repo
Copy link
Member

@wesleytodd wesleytodd left a comment

Choose a reason for hiding this comment

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

Pending the one question, this looks good.

const mainRepo = 'pkgjs/meet'

function getTestRepo () {
let testRepo = { owner: 'wesleytodd', repo: 'meeting-maker' } // ✨ Wes, the meeting maker ✨
Copy link
Member

Choose a reason for hiding this comment

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

🤣


testint:
runs-on: ubuntu-latest
# only run if not a fork PR targeting main repo due to permissions
Copy link
Member

Choose a reason for hiding this comment

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

Fwiw I am not sure this comment is any more clear than the code lol. Just to make sure I understand what you are saying here:

This checks to see if you are making a fork targeting your fork, not this repo?

If so, that seems like a reasonable middle ground to allow testing without leaking secrets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fork PR -> fork repo -> run test
fork PR -> main repo -> skip test

@wesleytodd wesleytodd merged commit d33fcc1 into pkgjs:main Aug 8, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants