-
Notifications
You must be signed in to change notification settings - Fork 43
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
Bug: Triggering via issue_comment Action Kicks Off Workflow For Incorrect Commit/Branch #61
Comments
This issue is actually mentioned in PR #11, but after it was merged. Figured it made sense to create a top-level ticket pointing out this issue. |
Just ran into the same thing. You can use version 1.1.0 of this action and provide This works for me:
|
@iwt-denniskribl
Please could you add this to trigger-circleci-pipeline-action/examples/ ? |
…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.
Fix trigger all tests branch (again). This was a pretty obvious bug - I was using the output of the `get-branch` step, but I never set the id of the step to that. This setup now more closely matches the [solution laid out as a github comment](CircleCI-Public/trigger-circleci-pipeline-action#61 (comment))
…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.
Fix trigger all tests branch (again). This was a pretty obvious bug - I was using the output of the `get-branch` step, but I never set the id of the step to that. This setup now more closely matches the [solution laid out as a github comment](CircleCI-Public/trigger-circleci-pipeline-action#61 (comment))
…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.
Fix trigger all tests branch (again). This was a pretty obvious bug - I was using the output of the `get-branch` step, but I never set the id of the step to that. This setup now more closely matches the [solution laid out as a github comment](CircleCI-Public/trigger-circleci-pipeline-action#61 (comment))
…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.
Fix trigger all tests branch (again). This was a pretty obvious bug - I was using the output of the `get-branch` step, but I never set the id of the step to that. This setup now more closely matches the [solution laid out as a github comment](CircleCI-Public/trigger-circleci-pipeline-action#61 (comment))
Is there an existing issue for this?
Current behavior
When I attempt to trigger a workflow in CircleCI from this GitHub Action on the created
issue_comment
event it works properly, but then starts the workflow on the incorrect branch within CircleCI. It appears to start the pipeline for the commit at HEAD ofmain
rather than on the branch/commit in the Pull Request that triggered the action.Minimum reproduction code
https://gist.github.com/jblacker/4f8b3d87b3b0b60a00c166e05d6ced81
Steps to reproduce
main
(or whatever your default is) rather than the head of the current branch of the PR.Expected behavior
I would have expected the branch that the PR is for to be triggered in CircleCI.
GitHub Action Version
1.0.5
Other
Here's the trigger on the CircleCI side of things:
The text was updated successfully, but these errors were encountered: