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

Add a 'source-root' input to the init Action #607

Merged
merged 21 commits into from
Jul 13, 2021
Merged

Add a 'source-root' input to the init Action #607

merged 21 commits into from
Jul 13, 2021

Commits on Jun 29, 2021

  1. Add 'source-root' input to init action

    This input is exposed in the CodeQL CLI as the flag --source-root, allowing
    users of the CLI to set --source-root different from --working-dir. However,
    in codeql-action, these two paths are conflated and it poses problems for
    users with complicated build environments, in which a source root may be
    a child of the working directory.
    
    Most users should not notice this, as the default value is
    ${{ github.workspace }}, as it is implied now (`path.resolve()`).
    mario-campos committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    42babdf View commit details
    Browse the repository at this point in the history
  2. Make 'source-root' init input relative to github.workspace

    In the previous commit, the default value of the input is ${{ github.workspace }}
    which means that most uses of this input would probably prefix their paths with
    ${{ github.workspace }}, especially since actions/checkout's 'path' input
    must be under ${{ github.workspace }}. Therefore, it doesn't make much sense for
    this to be an absolute file path.
    
    Instead, it's more intuitive to make this relative to the repository.
    mario-campos committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    337ae83 View commit details
    Browse the repository at this point in the history
  3. Remove '${{ github.workspace }}' from action.yml

    It causes the action to break (or rather that context being unavailable causes it to fail), despite it being in the description field.
    mario-campos committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    a05a7f9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    57f584a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e1cd524 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2021

  1. Refer to $GITHUB_WORKSPACE specifically in source-root description

    Previously, I had tried to refer to '${{ github.workspace }}', but that caused a problem in Actions. Trying to avoid the issue, I changed this to "the workspace," but this gives up quite a bit of specificity.
    
    Co-authored-by: Arthur Baars <[email protected]>
    mario-campos and aibaars authored Jun 30, 2021
    Configuration menu
    Copy the full SHA
    66df091 View commit details
    Browse the repository at this point in the history
  2. Use path.resolve instead of path.join for sourceRoot

    Thanks to @aibaars, `path.resolve()` should will nicely handle more use-cases, namely absolute paths better than `path.join()`.
    
    Co-authored-by: Arthur Baars <[email protected]>
    mario-campos and aibaars authored Jun 30, 2021
    Configuration menu
    Copy the full SHA
    35e1b55 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a607042 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2021

  1. Configuration menu
    Copy the full SHA
    c6728b6 View commit details
    Browse the repository at this point in the history
  2. Clarify 'source-root' description to include default path

    This addresses @adityasharad's suggestions in PR #607.
    mario-campos committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    45c0f11 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c78fb87 View commit details
    Browse the repository at this point in the history
  4. Use different config file for testing 'source-root' input

    This config file 'ought to have some queries good for testing!
    mario-campos committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    028f98f View commit details
    Browse the repository at this point in the history
  5. Delete 'packaing' from source-root test job name

    The test is not related to packaging.
    
    Co-authored-by: Aditya Sharad <[email protected]>
    mario-campos and adityasharad authored Jul 1, 2021
    Configuration menu
    Copy the full SHA
    67d6f79 View commit details
    Browse the repository at this point in the history
  6. Avoid moving repo files out of \$GITHUB_WORKSPACE in 'source-root' test

    Moving the files into ../action was causing the job to fail because it couldn't find the test directory anymore. According to @adityasharad, these 'mv's should
    not be necessary. Removing these means changing the path to the actions.
    
    I'm also removing the 'config-file' input to keep the test minimal. I think this will mean that CodeQL will use the default query suite, so I hope that this doesn't change the results.
    mario-campos committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    1c69fae View commit details
    Browse the repository at this point in the history
  7. Merge branch 'source-root-input' of github.com:mario-campos/codeql-ac…

    …tion into source-root-input
    mario-campos committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    2ca807c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    12f1cff View commit details
    Browse the repository at this point in the history
  9. Remove build.sh step from 'source-root' test

    As this test is using only JS, it's not necessary to compile or analyze the other languages.
    mario-campos committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    2c0da4b View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2021

  1. Test presence of database instead of results of analysis

    This is for PR #607, 'source-root' input test case.
    mario-campos committed Jul 2, 2021
    Configuration menu
    Copy the full SHA
    b9217ca View commit details
    Browse the repository at this point in the history
  2. Add analyze step to 'source-root' input test case

    Co-authored-by: Aditya Sharad <[email protected]>
    mario-campos and adityasharad authored Jul 2, 2021
    Configuration menu
    Copy the full SHA
    06c6845 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4a91a8 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2021

  1. Configuration menu
    Copy the full SHA
    9932052 View commit details
    Browse the repository at this point in the history