Skip to content

compare datastream workflow does not find the forking point #14274

@ggbecker

Description

@ggbecker

Description of problem:


Run echo "FORK_POINT=$(git merge-base origin/$BASE_BRANCH )" >> $GITHUB_OUTPUT
  echo "FORK_POINT=$(git merge-base origin/$BASE_BRANCH )" >> $GITHUB_OUTPUT
  shell: sh -e {0}
  env:
    BASE_BRANCH: 
usage: git merge-base [-a | --all] <commit> <commit>...
   or: git merge-base [-a | --all] --octopus <commit>...
   or: git merge-base --is-ancestor <commit> <commit>
   or: git merge-base --independent <commit>...
   or: git merge-base --fork-point <ref> [<commit>]

    -a, --[no-]all        output all common ancestors
    --octopus             find ancestors for a single n-way merge
    --independent         list revs not reachable from others
    --is-ancestor         is the first one ancestor of the other?
    --fork-point          find where <commit> forked from reflog of <ref>
0s

Run python3 ./ctf/content_test_filtering.py pr --base  --remote_repo https://github.com/ComplianceAsCode/content  --verbose --rule --output json  > output.json
usage: content_test_filtering.py pr [-h] [--base BASE_BRANCH]
                                    [--repository REPOSITORY_PATH]
                                    [--remote_repo REMOTE_REPO] [--local]
                                    [--verbose] [--output-tests]
                                    [--output-format {raw,markdown}]
                                    [--output {commands,json}] [--profile]
                                    [--rule]
                                    PR_NUMBER
content_test_filtering.py pr: error: argument --base: expected one argument
Error: Process completed with exit code 2.
0s

After the split of the build and comparison into two workflows, the forking point is not being found anymore.

We need to store the pull request info similarly as in:

- name: Save PR number and SHA

- name: Download PR info

Additional Information/Debugging Steps:

https://github.com/ComplianceAsCode/content/actions/runs/20379804488/job/58567249461

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions