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

Create GitHub Workflow to Run Custom Checks on PR Creation #65

Merged
merged 34 commits into from
Dec 6, 2023

Conversation

IsaacMilarky
Copy link
Collaborator

Create GitHub Workflow to Run Custom Checks on PR Creation

Problem

Before, linting and other checking wasn't done automatically when a pull-request was created.

Solution

When a pull request is created, a github action is triggered to run a set of checks on the corresponding git branch. The first of which, called run-pylint, runs pylint, stores the resulting json in a variable, and passes that variable to some check annotations. This job basically adds pylint annotations to a branch automatically when a PR is opened.

NOTE: I have tested this with the on: push trigger since It's better to test that way. According to LouisBrunner/checks-action#12 the action should behave the same when used with the on: pull_request trigger.

Result:
Screen Shot 2023-12-05 at 2 45 47 PM

Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
@IsaacMilarky IsaacMilarky added the enhancement New feature or request label Dec 5, 2023
@IsaacMilarky IsaacMilarky marked this pull request as draft December 5, 2023 20:48
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
@IsaacMilarky IsaacMilarky marked this pull request as ready for review December 5, 2023 21:07
@IsaacMilarky
Copy link
Collaborator Author

When I get the chance I plan to also do this for repolinter for automatic repo linting. That is something that can be used more broadly though so it might be worth it to host that somewhere separately. Keeping this PR small

@IsaacMilarky
Copy link
Collaborator Author

Tagging @decause-gov because this pr might be relevant to this issue: https://github.cms.gov/DSAC/ospo/issues/26

Copy link
Collaborator

@natalialuzuriaga natalialuzuriaga left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I'm working on linting rn as well so I'll add the frontend checks to the GH action file you made!!

@IsaacMilarky IsaacMilarky merged commit 3704a51 into dev Dec 6, 2023
3 checks passed
@IsaacMilarky IsaacMilarky deleted the create-checks-workflow branch December 6, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants