Redeploy to Posit Cloud from a project associates the content with project #452
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Intent
Redeploy to Posit Cloud from a project now correctly associates the content with that project. Previously, this was done on new deploys only. This affects Posit Cloud only.
Resolves #409
Type of Change
Approach
The code to fetch the Posit Cloud project associated with the content (in the case of the initial deployment) was extracted as a function and re-used in the case of re-deployments. In the case of re-deployment, the existing content in Posit Cloud is updated so that it is associated with the current project.
Automated Tests
The automated tests assert the API calls made to Posit Cloud to 1) retrieve the id of the current project, and 2) update the content being redeployed with that project id.
Directions for Reviewers
Minimal steps to verify:
rsconnectrsconnect deploy html my_output --name posit.cloudrsconnectrsconnect deploy html my_other_output --app-id <id_from_step_6> --name posit.cloudChecklist