Skip to content
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

Feature Request: Ability to specify commit (support workflow_run) #6

Open
Scottmitch opened this issue Dec 12, 2020 · 0 comments · May be fixed by #7
Open

Feature Request: Ability to specify commit (support workflow_run) #6

Scottmitch opened this issue Dec 12, 2020 · 0 comments · May be fixed by #7

Comments

@Scottmitch
Copy link

To support the workflow_run use case it is necessary to specify the commit to upload annotations against.

Here is an example of an action that provides this capability: https://github.com/ScaCap/action-surefire-report and here is the relevant code https://github.com/ScaCap/action-surefire-report/blob/master/action.js#L28

const commit = core.getInput('commit');
...
const head_sha = commit || (pullRequest && pullRequest.head.sha) || github.context.sha;
...
const createCheckRequest = {
        ...github.context.repo,
        name,
        head_sha,
        status,
        conclusion,
        output: {
            title,
            summary: '',
            annotations: annotations.slice(0, 50)
        }
    };

Here is an example usage of this feature: https://github.com/apache/spark/blob/master/.github/workflows/test_report.yml#L24

I think this should be relatively straight forward to add to this action, and would impact this area of code:
https://github.com/jwgmeligmeyling/checkstyle-github-action/blob/master/src/main.ts#L98

  let sha = context.sha

  if (context.payload.pull_request) {
    sha = context.payload.pull_request.head.sha
  }
Scottmitch added a commit to Scottmitch/checkstyle-github-action that referenced this issue Dec 12, 2020
@Scottmitch Scottmitch linked a pull request Dec 12, 2020 that will close this issue
Scottmitch added a commit to Scottmitch/checkstyle-github-action that referenced this issue Dec 12, 2020
Scottmitch added a commit to Scottmitch/checkstyle-github-action that referenced this issue Dec 12, 2020
srini-hv pushed a commit to srini-hv/checkstyle-github-action that referenced this issue Jul 15, 2021
ChristopheClermont pushed a commit to ChristopheClermont/checkstyle-github-action that referenced this issue Apr 3, 2024
…_yarn/tough-cookie-4.1.3

Bump tough-cookie from 4.0.0 to 4.1.3
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 a pull request may close this issue.

1 participant