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

Add wildcards to paths #230

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Add wildcards to paths #230

merged 1 commit into from
Oct 11, 2024

Conversation

ringods
Copy link
Member

@ringods ringods commented Oct 11, 2024

The pull-request workflow should handle 2 cases:

  • pull_request event: a PR created directly in the infra repository by an authorized user
  • pull_request_target event: a PR created in a fork of the infra repository by an external contributor when the changes only map to the YAML config files

My previous PR, #228, only changed such config files, but still the pull_request event was triggered:

https://github.com/pulumiverse/infra/actions/runs/11250271518

Screenshot 2024-10-11 at 15 51 40

I'm guessing that the pull_request_target event wasn't sent because it didn't match the folder names. Hence, the proposed change is to add wildcards after each.

@tmeckel tmeckel self-assigned this Oct 11, 2024
@tmeckel
Copy link
Member

tmeckel commented Oct 11, 2024

@ringods So that I can understand your thoughts: You appended wildcards to the pull_request_target paths because otherwise pull_request_target would only get triggered when one of the directories would be changed, but because Git has no concept of directory changes but only file changes pull_request_target never gets triggered at all.

Right?

Interestingly enough the GitHub documentation only shows examples with wildcards appended 😆
https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#using-filters-to-target-specific-paths-for-pull-request-or-push-events

@tmeckel tmeckel self-requested a review October 11, 2024 14:22
@ringods
Copy link
Member Author

ringods commented Oct 11, 2024

@tmeckel indeed. I was wondering why the pull_request_target event wasn't triggered and I guess it is because only the folder name doesn't match any of the files within.

@tmeckel tmeckel merged commit 73c3314 into pulumiverse:main Oct 11, 2024
0 of 2 checks passed
@ringods ringods deleted the fix-paths branch October 11, 2024 14:32
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