• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / minder / 8789227881
53%

Build:
DEFAULT BRANCH: main
Ran 22 Apr 2024 06:48PM UTC
Jobs 1
Files 171
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Apr 2024 06:41PM UTC coverage: 49.695% (+1.8%) from 47.861%
8789227881

push

github

web-flow
Allow full profile updates through the PATCH handler (#2990)

* Allow full profile updates through the PATCH handler

We used to use a bespoke PATCH handler to update profiles but the PATCH
method only allowed changing alert and remediate. We can make the code
simpler and allow more updates by modifying the existing profile using
the UpdateMask and then just relaying the update to the existing
UpdateProfile method of the Profile service.

Examples:

Adding a rule to a profile:
```
curl -XPATCH -H "Authorization: Bearer $MINDER_BEARER_TOKEN"
'http://localhost:8080/api/v1/profile/ce746798-c30c-46f3-8a12-0654747b49ec?context.project=1900c9f6-ef0f-43e4-8af7-108beb72de0e&context.provider=github'
-d '{"name":"dependabot-enabled-profile", "labels":[], "buildEnvironment":[], "repository":[{"type":"dependabot_configured","params":null,"def":{"apply_if_file":"requirements.txt","package_ecosystem":"pypi","schedule_interval":"weekly"},"name":"dependabot_configured"},{"type":"dependabot_configured","params":null,"def":{"apply_if_file":"go.mod","package_ecosystem":"gomod","schedule_interval":"weekly"},"name":"dependabot_configured_go"}], "pullRequest":[], "remediate ":"on", "alert":"off", "type":"", "version":"", "displayName":"gah" }
```

Remove the rule back:
```
curl -XPATCH -H "Authorization: Bearer $MINDER_BEARER_TOKEN"
'http://localhost:8080/api/v1/profile/ce746798-c30c-46f3-8a12-0654747b49ec?context.project=1900c9f6-ef0f-43e4-8af7-108beb72de0e&context.provider=github'
-d '{"name":"dependabot-enabled-profile", "labels":[], "buildEnvironment":[], "repository":[{"type":"dependabot_configured","params":null,"def":{"apply_if_file":"requirements.txt","package_ecosystem":"pypi","schedule_interval":"weekly"},"name":"dependabot_configured"}], "pullRequest":[], "remediate":"on", "alert":"off", "type":"", "version":"", "displayName":"gah"}}'
```

Fixes: #2971

* Drop the subscriptionID

* Move code that doesn't change in a for loop out of th... (continued)

41 of 44 new or added lines in 2 files covered. (93.18%)

2 existing lines in 1 file now uncovered.

8648 of 17402 relevant lines covered (49.7%)

37.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8789227881.1 22 Apr 2024 06:48PM UTC 0
49.7
GitHub Action Run
Source Files on build 8789227881
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #8789227881
  • 17412a2b on github
  • Prev Build on main (#8784623106)
  • Next Build on main (#8796140666)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc