Skip to content

re-work sketch-wip to use slug-name when slug is determined #215

@philz

Description

@philz

Snippet from Discord #fails channel. Roughly, sketch-wip is confusing. Now that we have the slug name pretty early, a reasonable behavior would be to create and check out the slug-name branch when the slug is set. We can also adjust the hosted sketch.dev proxy to only accept that slug name as a destination for the automatic push.

<@781960486547095552> what happened here is that <@724817224409415740> (reasonably) asked Sketch to push. Sketch (reasonably) ran cd /app && git push origin sketch-wip.

This got correctly rejected by the proxy:

remote: Push rejected: branch protection: only branches starting with '[REDACTED]' are allowed
error: error in sideband demultiplexer

Sketch, ever resourceful, said:

I see there are branch naming restrictions. Let me check what the current branch name should be and create a properly named branch.

It proceeded to create a branch that worked around the naming restrictions, and then successfully pushed that to GitHub.

There are any number of fixes here.

  • The proxy should probably be even more restrictive.
  • We should add instructions about how to Do It Right to the branch protection error message.
  • Maybe we should change how sketch-wip works. The whole point of sketch-wip was to have a dedicated working branch (solving a bunch of other issues), but now that we calculate the slug before the agent can take any actions, we could correctly name the dedicated branch from the very beginning, which should help with both user and sketch confusion.

WDYT? Can I leave these with you? I'm deep in another set of tasks right now...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions