pwntester commented on code in PR #31340:
URL: https://github.com/apache/superset/pull/31340#discussion_r1880951949
##########
.github/workflows/ephemeral-env.yml:
##########
@@ -27,8 +27,28 @@ jobs:
outputs:
slash-command: ${{ steps.eval-body.outputs.result }}
feature-flags: ${{ steps.eval-feature-flags.outputs.result }}
+ sha: ${{ steps.get-sha.outputs.sha }}
steps:
+ - name: Get Info from comment
+ uses: actions/github-script@v7
+ id: get-pr-info
+ with:
+ script: |
+ const request = {
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ pull_number: ${{ github.event.inputs.issue_number ||
github.event.issue.number }},
+ };
+ core.info(`Getting PR #${request.pull_number} from
${request.owner}/${request.repo}`);
+ const pr = await github.rest.pulls.get(request);
+ return pr.data;
+
+ - name: Debug
+ id: get-sha
+ run: |
+ echo "sha=${{ fromJSON(steps.get-pr-info.outputs.result).head.sha }}"
>> $GITHUB_OUTPUT
Review Comment:
If untrusted code needs to be run, I would move the IssueOps workflow to a
Label gate (pull_request + label). There is no way to get a trustful commit
date.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]