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

🐛 Fix null default branch/private fields #75

Merged
merged 8 commits into from Jan 31, 2022

Conversation

laurentsimon
Copy link
Contributor

@laurentsimon laurentsimon commented Jan 29, 2022

The repository.private and repository.default_branch are null when the action is triggered by a schedule trigger.
I think this is a bug and I've created a support issue on GitHub to ask.

There is another field master_branch but it may be deprecated in the future so I would like to avoid it.

To fix the issue, I'm querying a REST API instead, which seems more reliable.

closes #73

@laurentsimon laurentsimon changed the title Fix null default branch/private fields 🐛 Fix null default branch/private fields Jan 29, 2022
@laurentsimon
Copy link
Contributor Author

@ChrisCarini please verify that this fixes the problem. Use uses: laurentsimon/scorecard-action@bug/defaultbranch temporarily.

I'll push the changes/new version one you've confirmed.

Thanks for your patience!

@azeemshaikh38
Copy link
Contributor

@ChrisCarini please verify that this fixes the problem. Use uses: laurentsimon/scorecard-action@bug/defaultbranch temporarily.

I'll push the changes/new version one you've confirmed.

Thanks for your patience!

We need to find a better way to do integration tests. Could we prioritize it for this quarter?

@laurentsimon
Copy link
Contributor Author

laurentsimon commented Jan 29, 2022

@ChrisCarini please verify that this fixes the problem. Use uses: laurentsimon/scorecard-action@bug/defaultbranch temporarily.
I'll push the changes/new version one you've confirmed.
Thanks for your patience!

We need to find a better way to do integration tests. Could we prioritize it for this quarter?

yes, I totally agree. @naveensrinivasan and I will chat next week. There's some low-hanging fruit we can do in the next couple weeks. I'll create an issue with a list of tests we can start with and that should give us good coverage.

ChrisCarini added a commit to ChrisCarini/environment-variable-settings-summary-intellij-plugin that referenced this pull request Jan 30, 2022
ChrisCarini added a commit to ChrisCarini/environment-variable-settings-summary-intellij-plugin that referenced this pull request Jan 30, 2022
…`uses: laurentsimon/scorecard-action@bug/defaultbranch` for ossf/scorecard-action#75.
Copy link
Contributor

@ChrisCarini ChrisCarini left a comment

Choose a reason for hiding this comment

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

LGTM! Just a suggestion to reduce the calls - please consider accepting the suggestion into this PR! 😄

Brief testing notes below:

  1. Switched workflow to use @laurentsimon 's bug branch (commit ref)
  2. Observe results
    1. push workflow execution: ✅ Success (ref)
    2. workflow_dispatch workflow execution for master branch (default branch of this repo): ✅ Success (ref)
    3. workflow_dispatch workflow execution for addIconDir branch (non-default branch): ✅ Failure (expected; non-default branch not supported per failure message) (ref)

entrypoint.sh Outdated Show resolved Hide resolved
ChrisCarini added a commit to ChrisCarini/environment-variable-settings-summary-intellij-plugin that referenced this pull request Jan 30, 2022
Co-authored-by: Chris Carini <6374067+ChrisCarini@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

Only the default branch 'refs/heads/null' is supported after #68 landed
3 participants