这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@nicuveo
Copy link
Contributor

@nicuveo nicuveo commented Nov 10, 2020

Description

This PR changes our check configuration:

  • the changelog check will be re-run whenever a label changes
  • the hlint check will be skipped if a label named ignore-server-lint-checks is present
  • (it also adds one new hlint check)

This is hard to test, given that label events are only fired using the configuration as it is on main, according to the documentation. At the very least this runs, which means that even if it does not work as expected it won't break our workflows.

If someone has any experience with actions and can check this, that'd be great!

jobs:
hlint:
runs-on: ubuntu-20.04
if: !contains(github.event.pull_request.labels.*.name, 'ignore-lint-checks')
Copy link
Contributor

@tirumaraiselvan tirumaraiselvan Nov 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling it ignore-hlint-checks will disambiguate from other lints?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SG! Sorry, this is still a draft, I'm testing that this works as expected, the documentation for actions is a bit lackluster. ^^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might settle for ignore-server-lint-checks, since I'm working on other lint steps that are not hlint I'd like to be able to disable if necessary.

@nicuveo nicuveo marked this pull request as ready for review November 10, 2020 10:43
@nicuveo nicuveo requested a review from a team as a code owner November 10, 2020 10:43
@nicuveo nicuveo requested a review from abooij November 10, 2020 10:56
Copy link
Contributor

@abooij abooij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I agree with @tirumaraiselvan's proposal for somehow putting hlint in the name of the label. A PR might touch both the console and the server, for instance, and we wouldn't want to get mixed up in which code linter needs to be switched off. I think it'd be preferable to have many different labels for many different linters than to have one big on/off switch, that may end up only switching off part of the linters.

@nicuveo nicuveo force-pushed the hlint-security-valve branch from 339f584 to f58f7bb Compare November 20, 2020 09:23
@hasura-bot hasura-bot closed this Dec 7, 2020
hasura-bot added a commit that referenced this pull request Dec 7, 2020
* ci: add hlint escape hatch

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GITHUB_PR_NUMBER: 6164
GITHUB_PR_URL: #6164

* Applied changes to new workflow files.

* Add missing label trigger for lint worklow

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GitOrigin-RevId: 3e22c30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants