Giter Club home page Giter Club logo

checkstyle-github-action's People

Contributors

jwgmeligmeyling avatar mchenryc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

checkstyle-github-action's Issues

Check run result is pushed to any workflow, rather than the executing workflow

Github Actions run within a Workflow Run. Each Workflow Run is associated with its own Check Suite. Whenever we post a Check Run, a Check Suite is created unless a Check Suite for that application already exists. However, when multiple workflows are triggered for an event (or multiple events trigger multiple runs of the same workflow) , multiple possible Check Runs will be available. Unfortunately, there is no way for us to pick a Check Suite when creating a new Check Run. This is a limitation in the Github Checks API. As a result, currently results generated during workflows on a pull_request event might end up at the push workflow, if both events are used together.

84824386-2423f600-b020-11ea-9adb-b5ca28894442

(The interesting part about this image is that the "build-test PMD" run was created during "build-test on: pull request".

See also: https://github.community/t/specify-check-suite-when-creating-a-checkrun/118380?u=jwgmeligmeyling
Copy of: jwgmeligmeyling/pmd-github-action#4

support for cpd

Does this should work for the maven pmd:cpd goal? look likes it is not. I hope you can clarify. Thanks
(sorry this is for your pmd-github-action not checkstyle...)

HttpError: request to enterprise github API with self-signed certificate - unable to verify the first certificate

When working on a project in an enterprise github instance with a self-signed certificate, I get the following output.

Creating annotations for /home/runner/actions-runner/_work/demo-api/demo-api/build/reports/checkstyle/main.xml
Creating annotations for /home/runner/actions-runner/_work/demo-api/demo-api/build/reports/checkstyle/test.xml
Uploading 0 / 0 annotations to GitHub as Checkstyle with conclusion success
Error: HttpError: request to https://github.company.local/api/v3/repos/Organization/demo-api/commits/eebc1a4ba7aedc7000ae18a04d52207653c33eac/check-runs failed, reason: unable to verify the first certificate

So, the action does the first part fine, but when it attempts to communicate with the server, it gets this error.

The runner is a self-hosted runner on Ubuntu and the certificate for the github.company.local address is installed under /etc/ssl/certs. I have the following environment var set in the workflow

env:
  SSL_CERT_DIR: "/etc/ssl/certs"

This gets picked up by the other actions like Java and the Gradle build that runs to produce the checkstyle reports.

I tried adding another environment variable for node:

  NODE_EXTRA_CA_CERTS: "/etc/ssl/certs/wildcard.company.pem"

But to no avail.

Is there something I missed?

Unchanged files with check annotations

If a checkstyle report contains issues for files not modified in the PR, these issues are reported in the PR at the end, under a section "Unchanged files with check annotations ".

It would be great to be able to only annotate the files modified in the PR.

I have no idea if this is something that has to be done:

  • In the previous step (prune the checkstyle reports before this Github action intervenes)
  • By this Github action
  • Some setting somewhere in Github ๐Ÿค”
    • I don't think this is the solution. I would like to see annotations from a different github action regarding failing tests, outside of modified files, because a PR can break tests that weren't modified. However, I'd only like to see checkstyle issues introduced in the modified files.

I open the issue here in case anything can be done about it here.

Great Github action btw! ๐Ÿ‘

Allow reporting annotations without creating a new check

Right now this action adds a new check to report all annotations. Ideally I'd want to disable this behavior and just report annotations "normally" like other actions do.

For example, one of the linters I use is markdownlint and I enabled a problem matcher for that to create annotations. Another one is yutailang0119/action-android-lint that uses the GitHub actions toolkit to create the annotations from a Android XML file.

Feature Request: Ability to specify commit (support workflow_run)

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
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.