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

Lintly fails in CodeBuild when merged to master #14

Open
grantmcconnaughey opened this issue Sep 11, 2019 · 0 comments
Open

Lintly fails in CodeBuild when merged to master #14

grantmcconnaughey opened this issue Sep 11, 2019 · 0 comments

Comments

@grantmcconnaughey
Copy link
Owner

When running CodeBuild on merges Lintly will fail. It only takes the format of pr/{pr_number} if triggered by a webhook.

https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html

Traceback (most recent call last): 
  File "/usr/local/bin/lintly", line 10, in <module> 
    sys.exit(main()) 
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__ 
    return self.main(*args, **kwargs) 
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main 
    rv = self.invoke(ctx) 
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke 
    return ctx.invoke(self.callback, **ctx.params) 
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke 
    return callback(*args, **kwargs) 
  File "/usr/local/lib/python3.6/site-packages/lintly/cli.py", line 67, in main 
    build.execute() 
  File "/usr/local/lib/python3.6/site-packages/lintly/builds.py", line 55, in execute 
    if not self.config.pr: 
  File "/usr/local/lib/python3.6/site-packages/lintly/config.py", line 25, in pr 
    return self.cli_config['pr'] or getattr(self.ci, 'pr') 
  File "/usr/local/lib/python3.6/site-packages/lintly/ci.py", line 103, in pr 
    return os.environ['CODEBUILD_SOURCE_VERSION'].split('/')[1] 
IndexError: list index out of range
renefritze pushed a commit to renefritze/Lintly that referenced this issue Feb 21, 2022
…to-messages

Added context (which includes linter name, unless explicitly overridden via CLI flags) to PR comments.
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

No branches or pull requests

1 participant