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

Skip the version-checker-workflow outside of GatherPress org #587

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

carstingaxion
Copy link
Collaborator

Currently, the WordPress version checker workflow runs on every PR, even when made from outside the GatherPress organization.

I'd like to prevent this workflow to run on forks outside of the GatherPress organization, because the required permission to create an issue would not be given and the workflow would fail.

Description of the Change

Using a condition check, to test for the GatherPress org will skip the test for every PR, that is opened from an external namespace.

Closes #

How to test the Change

  1. Fork GatherPress into your namespace
  2. Create a new branch, commit and publish some changes
  3. open a PR to merge your new branch into the main branch
  4. See the workflow to be skipped, like I did.

Changelog Entry

Changed - Prevent the WordPress version checker workflow to run & fail for PRs from outside the GatherPress organization.

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Copy link

what-the-diff bot commented Mar 6, 2024

PR Summary

  • Improved Workflow Condition
    The update has added a condition check to the system workflow that ensures it only runs within the GatherPress organization. This prevents the workflow from inadvertently running on forked versions of the code outside our organization. This added restriction is expected to increase the security and controlled operation of the system.

@carstingaxion
Copy link
Collaborator Author

I wanted to add, that the described behaviour happened to me within the last PRs, like here:

https://github.com/GatherPress/gatherpress/actions/runs/8173255162/job/22345326819?pr=585

@carstingaxion carstingaxion changed the title Skip the workflow outside of GatherPress org Skip the version-checker-workflow outside of GatherPress org Mar 7, 2024
@mauteri mauteri merged commit a254298 into GatherPress:main Mar 8, 2024
10 checks passed
@carstingaxion carstingaxion deleted the fix/skip-workflow branch March 12, 2024 00:04
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.

2 participants