Skip to content

Commit

Permalink
Merge pull request #21 from nigeljamesstevenson/update/cherry-pick-on…
Browse files Browse the repository at this point in the history
…ly-works-on-trunk

log outputs for debugging
  • Loading branch information
nigeljamesstevenson authored May 9, 2024
2 parents f2018be + 4652ffa commit d5922a5
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,10 @@ jobs:
const issue = context.payload.issue;
const pullRequestUrl = issue.pull_request.url;
const prDetails = await github.request(pullRequestUrl);
console.log("PR Base Ref:", prDetails.data.base.ref);
core.setOutput('base_ref', prDetails.data.base.ref);
core.setOutput('head_ref', prDetails.data.head.ref);
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Use Pull Request Details
run: |
echo "Base branch of the PR is ${{ steps.fetch_pr_details.outputs.base_ref }}"
echo "Head branch of the PR is ${{ steps.fetch_pr_details.outputs.head_ref }}"
- name: check
id: check
uses: actions/github-script@v6
Expand All @@ -77,16 +70,9 @@ jobs:
const isBot = context.payload.pull_request && ( context.payload.pull_request.user.login == 'github-actions[bot]' || context.payload.pull_request.user.type == 'Bot' );
console.log("isManualTrigger:", isManualTrigger);
console.log("isMergedMilestonedIssue:", isMergedMilestonedIssue);
console.log("isMergedMilestonedPR:", isMergedMilestonedPR);
console.log("isBot:", isBot);
if ( !isBot && ( isManualTrigger || isMergedMilestonedIssue || isMergedMilestonedPR ) ) {
console.log("Setting 'run' to true");
core.setOutput( 'run', 'true' );
} else {
console.log("Setting 'run' to false");
core.setOutput( 'run', 'false' );
}
env:
Expand Down

0 comments on commit d5922a5

Please sign in to comment.