batches: closing a batch change with only draft changesets doesn't ask whether to close
Created by: LawnGnome
This was spotted by @emchap: if a batch change has one or more open changesets, we ask the user if they want to close them or not, but we don't trigger this behaviour for draft changesets.
What this should look like:
What this does look like:
Here's a spec that triggers the behaviour (applied at https://k8s.sgdev.org/users/aharvey/batch-changes/all-drafts-all-the-time):
name: all-drafts-all-the-time
description: "All death metal^W^Wdrafts, all the time"
# "on" specifies on which repositories to execute the "steps".
on:
# Example: find all repositories that contain a README.md file.
- repository: github.com/sourcegraph/automation-testing
# "steps" are run in each repository. Each step is run in a Docker container
# with the repository as the working directory. Once complete, each
# repository's resulting diff is captured.
steps:
# Example: append "Hello World" to every README.md
- run: echo "Hello World" | tee -a $(find -name README.md)
container: alpine:3
# "changesetTemplate" describes the changeset (e.g., GitHub pull request) that
# will be created for each repository.
changesetTemplate:
title: Draft PR
body: "This is a draft PR. Thrilling, yes?"
branch: all-drafts-all-the-time
commit:
author:
name: Adam Harvey
email: [email protected]
message: Append Hello World to all README.md files
# Change published to true once you're ready to create changesets on the code host.
published: draft