Skip to content

CLOUDP-304211: Only accept pull_request_target with safe-to-test label #2211

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

Merged
merged 6 commits into from
Mar 21, 2025

Conversation

josvazg
Copy link
Collaborator

@josvazg josvazg commented Mar 18, 2025

This PR uses a new small trigger.yml workflow to handle the logic for both pull_request & pull_request_target separately of other ways to trigger the test.yml workflow. There are only 2 scenarios allowed:

  1. The pull_request events without the safe-to-test label, intended for code owner contributions. Uses the incoming change repo creds, which is the same, as the PR comes from a branch in the same repo.
  2. The pull_request_target events with safe-to-test label that a code owner have just set. Uses the target repo creds, that is the AKO repo creds, and is intended to allow contributions to be tested once a code owner decides it is safe to do so.

All Submissions:

  • Have you signed our CLA?

@josvazg josvazg requested a review from a team as a code owner March 18, 2025 17:57
@josvazg josvazg force-pushed the CLOUDP-304211/fix-contributions branch from 0599e1d to bda5f75 Compare March 18, 2025 18:01
And exclude the pr evertn when safe-to-test is set

Signed-off-by: jose.vazquez <[email protected]>
@josvazg josvazg force-pushed the CLOUDP-304211/fix-contributions branch from bda5f75 to 18fd2e6 Compare March 18, 2025 18:04
Signed-off-by: jose.vazquez <[email protected]>
@josvazg josvazg force-pushed the CLOUDP-304211/fix-contributions branch from 6e93ef3 to 38a3704 Compare March 18, 2025 18:38
@josvazg josvazg changed the title Only accept pr target with safe-to-test Only accept pull_request_target with safe-to-test Mar 18, 2025
@josvazg josvazg changed the title Only accept pull_request_target with safe-to-test Only accept pull_request_target with safe-to-test label Mar 18, 2025
@josvazg josvazg added safe-to-test retest Forces basic retesting and removed safe-to-test retest Forces basic retesting labels Mar 19, 2025
@josvazg josvazg marked this pull request as ready for review March 19, 2025 10:55
@josvazg josvazg changed the title Only accept pull_request_target with safe-to-test label [WIP] Only accept pull_request_target with safe-to-test label Mar 19, 2025
@josvazg josvazg changed the title [WIP] Only accept pull_request_target with safe-to-test label Only accept pull_request_target with safe-to-test label Mar 20, 2025
@josvazg
Copy link
Collaborator Author

josvazg commented Mar 20, 2025

The only way to activate this change and test it is by merging it first, unfortunately. This is because the pull_request_target we need to test runs on the base branch (main) context, and will not have the new trigger logic until it is merged in.

@josvazg josvazg changed the title Only accept pull_request_target with safe-to-test label CLOUDP-304211: Only accept pull_request_target with safe-to-test label Mar 20, 2025
@josvazg
Copy link
Collaborator Author

josvazg commented Mar 20, 2025

CLOUDP-304211

@josvazg josvazg merged commit 194bc76 into main Mar 21, 2025
30 of 49 checks passed
@josvazg josvazg deleted the CLOUDP-304211/fix-contributions branch March 21, 2025 14:04
josvazg added a commit that referenced this pull request Mar 21, 2025
josvazg added a commit that referenced this pull request Mar 21, 2025
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