tests trigger: add target-branch parameter to trigger from the right branch#4121
Merged
Conversation
tonidero
approved these changes
Jul 29, 2024
| # Even though it seems to be undocumented as of writing. | ||
|
|
||
| - name: 'Get GitHub branch' | ||
| run: echo ::set-output name=branch::$(gh pr view $PR_NO --repo $REPO --json headRefName --jq '.headRefName') |
Contributor
There was a problem hiding this comment.
I guess the gh CLI will be installed right? I would imagine so, being a github action 😅
Member
Author
There was a problem hiding this comment.
it is, listed here:
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#cli-tools
I'll add a comment that this assumes that it's installed, though, just in case it randomly gets removed one day, although I can't imagine that would ever be the case
vegaro
reviewed
Jul 29, 2024
| fi | ||
| echo "User is a member of the organization" | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
super nit but there's an extra line here
JayShortway
approved these changes
Jul 29, 2024
JayShortway
left a comment
Member
There was a problem hiding this comment.
Nice job getting this fixed! 🙌
| # But we can also see that the following code reads from this parameter: https://github.com/CircleCI-Public/trigger-circleci-pipeline-action/blob/a81cd720792a6088debd7f182b552845abb86f1b/src/lib/CircleCIPipelineTrigger.ts#L66 | ||
| # Even though it seems to be undocumented as of writing. | ||
|
|
||
| - name: 'Get GitHub branch' |
Member
There was a problem hiding this comment.
Nitpick: maybe this step can be named "Get PR branch"? "PR" is the relevant bit imo.
vegaro
approved these changes
Jul 29, 2024
jamesrb1
pushed a commit
that referenced
this pull request
Aug 7, 2024
…branch (#4121) Fix the `@RCGitBot please test` issue where tests would always get triggered from the `main` branch. This solution is based on this comment: CircleCI-Public/trigger-circleci-pipeline-action#61 (comment) But you can also see in the code that this is indeed how the branch name is determined, and that that [logic looks the same as the one for `GHA_action` and `target-slug`](https://github.com/CircleCI-Public/trigger-circleci-pipeline-action/blob/a81cd720792a6088debd7f182b552845abb86f1b/src/lib/CircleCIPipelineTrigger.ts#L66), so it's just undocumented. We're using a fixed version, 1.2.0, so it shouldn't just randomly break.
MarkVillacampa
pushed a commit
that referenced
this pull request
Aug 7, 2024
**This is an automatic release.** ### Bugfixes * Fix Paywalls crash on iOS 18 beta (#4154) via Andy Boedo (@aboedo) ### Dependency Updates * Bump danger from 9.4.3 to 9.5.0 (#4143) via dependabot[bot] (@dependabot[bot]) * Bump nokogiri from 1.16.6 to 1.16.7 (#4129) via dependabot[bot] (@dependabot[bot]) * Bump fastlane from 2.221.1 to 2.222.0 (#4130) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Update deployment targets for tests (#4145) via Andy Boedo (@aboedo) * Deploy purchaserTester: clean up dry-run parameter (#4140) via Andy Boedo (@aboedo) * Clean up API Testers (#4141) via Andy Boedo (@aboedo) * More project structure cleanup (#4131) via Andy Boedo (@aboedo) * temporarily disables purchasetester deploy (#4133) via Andy Boedo (@aboedo) * Fix trigger all tests branch (#4135) via Andy Boedo (@aboedo) * Clean up XCWorkspace and testing apps (#4111) via Andy Boedo (@aboedo) * tests trigger: add target-branch parameter to trigger from the right branch (#4121) via Andy Boedo (@aboedo) * Re-added the RevenueCatUI tests job on every commit (#4113) via Andy Boedo (@aboedo)
nyeu
pushed a commit
that referenced
this pull request
Oct 2, 2024
…branch (#4121) Fix the `@RCGitBot please test` issue where tests would always get triggered from the `main` branch. This solution is based on this comment: CircleCI-Public/trigger-circleci-pipeline-action#61 (comment) But you can also see in the code that this is indeed how the branch name is determined, and that that [logic looks the same as the one for `GHA_action` and `target-slug`](https://github.com/CircleCI-Public/trigger-circleci-pipeline-action/blob/a81cd720792a6088debd7f182b552845abb86f1b/src/lib/CircleCIPipelineTrigger.ts#L66), so it's just undocumented. We're using a fixed version, 1.2.0, so it shouldn't just randomly break.
nyeu
pushed a commit
that referenced
this pull request
Oct 2, 2024
**This is an automatic release.** ### Bugfixes * Fix Paywalls crash on iOS 18 beta (#4154) via Andy Boedo (@aboedo) ### Dependency Updates * Bump danger from 9.4.3 to 9.5.0 (#4143) via dependabot[bot] (@dependabot[bot]) * Bump nokogiri from 1.16.6 to 1.16.7 (#4129) via dependabot[bot] (@dependabot[bot]) * Bump fastlane from 2.221.1 to 2.222.0 (#4130) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Update deployment targets for tests (#4145) via Andy Boedo (@aboedo) * Deploy purchaserTester: clean up dry-run parameter (#4140) via Andy Boedo (@aboedo) * Clean up API Testers (#4141) via Andy Boedo (@aboedo) * More project structure cleanup (#4131) via Andy Boedo (@aboedo) * temporarily disables purchasetester deploy (#4133) via Andy Boedo (@aboedo) * Fix trigger all tests branch (#4135) via Andy Boedo (@aboedo) * Clean up XCWorkspace and testing apps (#4111) via Andy Boedo (@aboedo) * tests trigger: add target-branch parameter to trigger from the right branch (#4121) via Andy Boedo (@aboedo) * Re-added the RevenueCatUI tests job on every commit (#4113) via Andy Boedo (@aboedo)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the
@RCGitBot please testissue where tests would always get triggered from themainbranch.This solution is based on this comment: CircleCI-Public/trigger-circleci-pipeline-action#61 (comment)
But you can also see in the code that this is indeed how the branch name is determined, and that that logic looks the same as the one for
GHA_actionandtarget-slug, so it's just undocumented.We're using a fixed version, 1.2.0, so it shouldn't just randomly break.