Github checks + action integration - github

I am trying to implement eslint check everytime I push code in GitHub and I came across checks(https://developer.github.com/apps/quickstart-guides/creating-ci-tests-with-the-checks-api/) in GitHub, but get couldn’t get much on “how-to setup” though it has all the apis and other stuff to integrate eslint with checks.
FYI, I have built a bot to check the git events using probot.github.io and it works well. Now I want to integrate checks with it.
Any suggestions ?
Thanks in advance.

There are a number of ESLint GitHub Actions published to the marketplace that will do linting and annotations of pull requests. Perhaps one of those will fit your use-case.
Check them out here:
https://github.com/marketplace?utf8=%E2%9C%93&type=actions&query=eslint

Related

Enable/Disable CodeQL code scanning for a repo using Github Rest API

Is it possible to enable/disable CodeQL code scanning for a repo using Github Rest API in any of the Github accounts?(Personal accounts/ Organization accounts /Enterprise accounts)
https://docs.github.com/en/enterprise-cloud#latest/rest/code-scanning?apiVersion=2022-11-28#about-code-scanning
Please refer to this document.I tried to automate enable/disable codeql for a repo using github rest api.Couldnt find any solution in this documentation.
The API only seems to provide endpoints for getting code scanning results at the moment. Also, until recently you always had to include configuration files in your repository to set up CodeQL code scanning. And depending on what languages you want to scan you might still need configuration files, see the documentation.
However, if you have already set up CodeQL code scanning manually you could maybe use the REST API endpoints for disabling and enabling the already existing code scanning workflow.
Disabling CodeQL code scanning (through the REST API) seems like a rather uncommon use case. Could you explain your use case a bit more in detail? Maybe there are better ways to solve this, for example you can customize which severities cause a pull request check failure.

Github pull request issue "This comparison is taking too long to generate" with project using RASA framework

I have this issue when I try to merge my branch to the main one for my RASA chatbot project and I want to know if there are any ways to fix this and create a pull request or should I just change my main branch to the domain-side branch
Ok so I fixed the issue by deleting the .rasa cache folder
This can occur when there are a lot of commits in your Pull Request
Unfortunately, this is a known github issue.
Thanks for writing to GitHub support and sorry for the trouble!
We have received a few similar reports regarding big pull requests. I can confirm that our team is working on fixing this problem, and I've added your report to that issue.
Unfortunately I won't be able to provide an estimated time on when this might get fixed. We know this is not ideal, but hope you understand.
Is there anything we can do to preserve our comments and alleviate this issue now and in the future?
You should be able to use our API to get a copy of the comments in this pull request:
https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request
https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request
If you have any question regarding using API we can definitely offer more detailed instructions.
Unfortunately I'm not sure if there's anything you can do on your part to view this pull request normally.
One thing you could try is viewing this PR in Incognito window or logged out.
I was actually able to view the PR you linked because I don't have write access to this repository, so GitHub will try to load less things for me such as edit buttons and so on. Of course this won't allow you to merge the pull request and so on, but perhaps it would help for you to look at its content?
Lastly, while we are working on consistently supporting large pull requests, you might consider keeping pull requests relatively short for now to avoid running into this again.
I hope this helps clear things up, and please let us know if you have any other questions.
Please refer to the full discussion provided here.

How to implement accessibility linting in GitHub actions?

I want to upgrade our GitHub workflows with accessibility linting based on WCAG 2.1. If it's possible I want to define the level too like AA.
I don't want to run a full test on a website, only make a quick linting on the pull requests. The whole site testing will be the next step, but now I want to focusing to pull requests only.
I checked pa11y and several repos based on this, but as I see this solution can test only a working website and not a pull request.
Is there any working solution for this?

Is there a way in VSTS using which I can see all the open pull requests across all the projects?

I would like to view all open pull requests across all of the projects under my VSTS account. Is there any plugin or any other way to do this?
I checked out this plugin https://marketplace.visualstudio.com/items?itemName=ryanstedman.tfs-pullrequest-dashboard&targetId=75aae682-e2e0-4f61-875b-c3b0544f2d4e&utm_source=vstsproduct&utm_medium=ExtHubManageList#overview but it only shows open pull requests for a particular project.
There isn’t the built-in feature or extension can see all open pull requests directly, also, I don’t find the third-party extension can do it.
I recommend that you can build the app or extension through Pull Request REST API, you can refer to that extension’s source code to do it with an extension.
This is now possible by visiting https://dev.azure.com/YOURACCOUNTNAME/_pulls

How to prevent git pull request if JSLint fails

I am working on a large project with a number of other developers.
We have implement JSHint which will throw an error when grunt build is run if the JavaScript does not pass the Lint.
I would like to know if it is possible to integrate directly with Github so that a Pull Request will not be allowed to be merged unless it passes in JSHint.
Is there a way or tool to do this?
You can't prevent pull requests from being merged; however, you can automatically run JSLint using Travis-CI, which will put a big red X on pull requests that do not pass JSLint. Hopefully this is enough to stop people from merging these pull requests.
This blog post gives a good introduction to running grunt tasks on Travis-CI.
There is a free way to do it too by lint-review
As #tbekolay said, it puts a red sign.
Also, you will see the problems as comments on the code wich is super cool.
But you can merge it manually.