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: Omit Commit SHA from detection output when empty #92

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

spdawson
Copy link
Contributor

@spdawson spdawson commented Nov 1, 2022

Description

When the commit SHA is empty, it should not appear in the raw detection output.

Example of raw output including empty commit SHA:

{
		"classification": {
			"decision": {
				"reason": "domain_not_reachable",
				"state": 2
			},
			"recipe_match": false,
			"url": "https://datadoghq.eu"
		},
		"commit_sha": "",
		"detector_type": "yaml_config",
		"source": {
			"column_number": 7,
			"filename": ".drone.yml",
			"language": "YAML",
			"language_type": "data",
			"line_number": 83,
			"text": "DD_SITE: datadoghq.eu"
		},
		"type": "interface_classified",
		"value": {
			"type": "url",
			"value": {
				"parts": [
					{
						"type": "string",
						"value": "datadoghq.eu"
					}
				]
			},
			"variable_name": "DD_SITE"
		}
	}

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@swarmia
Copy link

swarmia bot commented Nov 1, 2022

✅  Linked to AMA-3045 · Omit empty commit sha
➡️  Part of AMA-2947 · OSS - Curio CLI

elsapet
elsapet previously approved these changes Nov 1, 2022
Copy link
Contributor

@elsapet elsapet left a comment

Choose a reason for hiding this comment

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

🙏 🎉

@spdawson spdawson force-pushed the AMA-3045-ommit-empty-commit-SHA branch from 14b4b36 to df39959 Compare November 1, 2022 09:44
@spdawson spdawson added bug Something isn't working echoes/effort: XS labels Nov 1, 2022
@spdawson spdawson merged commit 3931e8d into main Nov 1, 2022
@spdawson spdawson deleted the AMA-3045-ommit-empty-commit-SHA branch November 1, 2022 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants