Skip to content

Renamed or removed Environments are sent DELETE requests in nop mode #799

Open
@klutchell

Description

@klutchell

Problem Description

As per the title, when Environments are renamed or removed entirely in the config and the app is executed in nop mode via a pull request check run, the environment will be deleted from the associated repositories.

What is actually happening

As per the title, when Environments are renamed or removed entirely in the config and the app is executed in nop mode via a pull request check run, the environment REST endpoint will be sent a DELETE request.

What is the expected behavior

In nop mode no changes should be made to repository settings.

Error output, if available

Not errors, but these logs were generated on a no-op dry run of safe-settings where balena-staging.com+sign-api-key had been deleted from the settings.

{"level":20,"time":1740682249048,"pid":24,"hostname":"safe-settings-d86c9d9d7-bwdrd","name":"probot","name":"probot","name":"octokit","msg":"GitHub request: DELETE https://api.github.com/repos/balena-os/balena-iot-gate-imx8plus/environments/balena-staging.com%2Bsign-api-key - 204"}
2025-02-27 13:50:48.103	
{"level":20,"time":1740682248103,"pid":24,"hostname":"safe-settings-d86c9d9d7-bwdrd","name":"probot","name":"probot","name":"octokit","msg":"GitHub request: DELETE https://api.github.com/repos/balena-os/balena-iot-gate-imx8plus/environments/balena-cloud.com%2Bsign-api-key - 204"}
2025-02-27 13:50:41.042	
{"level":20,"time":1740682241041,"pid":24,"hostname":"safe-settings-d86c9d9d7-bwdrd","name":"probot","name":"probot","name":"octokit","msg":"GitHub request: DELETE https://api.github.com/repos/balena-os/balena-iot-gate-imx8/environments/balena-staging.com%2Bsign-api-key - 204"}

Context

Are you using the hosted instance of probot/settings or running your own?

Self-hosted

If running your own instance, are you using it with github.com or GitHub Enterprise?

github.com

Version of probot/settings

We previously thought this issue had been addressed here: #691

Last reproduced in https://github.com/github/safe-settings/releases/tag/2.1.16

Version of GitHub Enterprise

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions