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

Determine modified files for pull requests and pushes #24

Merged
merged 15 commits into from
Dec 17, 2021

Commits on Dec 10, 2021

  1. Determine modified files for pull requests

    That's the first step. The modified files are determined via pull/{pull_number}/files.
    This API call returns at most 3000 files. We use a page size of 30 and collect at most
    10 pages, so that we have a total of 300 files - that's what we use for analyzing.
    This means for big changes, not all files might be analyzed.
    adangel committed Dec 10, 2021
    Configuration menu
    Copy the full SHA
    1be700c View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2021

  1. Fix input parameter "analyzeModifiedFilesOnly"

    Also add logging which mode is active.
    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    313aa52 View commit details
    Browse the repository at this point in the history
  2. Don't execute PMD when no modified files are found

    This also sets the output parameter to zero.
    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    14becf8 View commit details
    Browse the repository at this point in the history
  3. Add debug logging

    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    5122912 View commit details
    Browse the repository at this point in the history
  4. Improved logging

    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    774fc45 View commit details
    Browse the repository at this point in the history
  5. REVERT ME - Enable debug logging

    Usually debug logging is enabled by adding a repository secret
    "ACTIONS_STEP_DEBUG" with value "true". However, this is
    secret not available if a PR runs from a forked repository...
    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    7f99864 View commit details
    Browse the repository at this point in the history
  6. Revert "REVERT ME - Enable debug logging"

    This reverts commit 7f99864.
    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    f67f542 View commit details
    Browse the repository at this point in the history
  7. Fix path handling under windows

    Let the unit tests run under macos and windows additionally.
    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    64cd667 View commit details
    Browse the repository at this point in the history
  8. Fix unit tests under windows

    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    1216290 View commit details
    Browse the repository at this point in the history
  9. Fix unit tests under windows

    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    08f8d9f View commit details
    Browse the repository at this point in the history
  10. Fix unit tests under windows

    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    4106851 View commit details
    Browse the repository at this point in the history
  11. Fix unit tests under windows

    adangel committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    4211caa View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2021

  1. Determine modified files for pushes

    The modified files are determined via compare API call. Similar
    to pull requests, we only collect at most 10 pages. However, the
    number of total changed files can't be calculated straightforward,
    since the pagination happens on the basis of commits rather than files.
    In any case, for big pushes this means, that not all files might
    be analyzed.
    adangel committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    ffa00d2 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2021

  1. Configuration menu
    Copy the full SHA
    25c2479 View commit details
    Browse the repository at this point in the history
  2. Log warning when MAX_PAGE is reached

    This always logs a warning if we fetched page MAX_PAGE
    regardless whether there would be more pages to fetch
    or not. No effort is done to determine
    whether the list of modified files is complete.
    
    Also the modified files are now collected in
    a Set to avoid duplicate entries.
    adangel committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    22ebdb5 View commit details
    Browse the repository at this point in the history