GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use $EDITOR to define campaign name/desc if not given by mrnugget · Pull Request #91 · sourcegraph/src-cli

Conversation

@mrnugget

@mrnugget mrnugget commented Jan 28, 2020

Copy link
Copy Markdown
Contributor

This opens a template markdown file in $EDITOR if either no -name or no -desc are given on the command line.

This is heavily inspired by the implementation of GitHub's hub issue create, except that it's probably 1/4 of the code.

I also took the little regex from it, to determine whether $EDITOR is a Vim and if so set the filetype to Markdown :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mrnugget
mrnugget requested review from eseliger, felixfbecker, keegancsmith, kzh, ryanslade, sqs and tsenart January 28, 2020 16:31
This was referenced Jan 28, 2020
a8n: Document src actions scope-query and using editor sourcegraph/sourcegraph-public-snapshot#8089
Merged
a8n: Finish implementation of src actions exec sourcegraph/sourcegraph-public-snapshot#7850
Closed
mrnugget added 4 commits January 28, 2020 18:09
@mrnugget
Use $EDITOR to define campaign name/desc if not given
c8bddc1
This opens a template markdown file in $EDITOR if either no `-name` or
no `-desc` are given on the command line.
@mrnugget
Get rid of comment char
d6776c1
@mrnugget
Change friendly message to use interactive version
a2428f6
@mrnugget
Create easier to undestand error when $EDITOR is not set
7ddb491
@mrnugget
mrnugget force-pushed the create-campaign-editor branch from 7530151 to 7ddb491 Compare January 28, 2020 17:09
sqs
sqs approved these changes Jan 28, 2020
View reviewed changes
Comment thread cmd/src/campaigns_create.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread cmd/src/campaigns_create.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread cmd/src/campaigns_create.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

mrnugget added 2 commits January 28, 2020 18:18
@mrnugget
Change usage information for 'campaign create'
697012b
@mrnugget
Fix typo and use Getenv instead of ExpandEnv
3e37d68
keegancsmith
keegancsmith reviewed Jan 28, 2020
View reviewed changes
Comment thread cmd/src/campaigns_create.go
}

func (e *CampaignEditor) EditAndExtract() (string, string, error) {
f, err := ioutil.TempFile("", "new-campaign")

@keegancsmith keegancsmith Jan 28, 2020

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you just give this file the suffix .md so all editors highlight it correctly?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mrnugget mrnugget Jan 28, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saw this too late: #92

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mrnugget
mrnugget merged commit 2690acf into master Jan 28, 2020
mrnugget added a commit that referenced this pull request Jan 28, 2020
@mrnugget
Use a temp file with .md extension for 'campaigns create'
aa7662d
This implements the suggestion by @keegancsmith that I saw _in the
exact same moment that I hit the merge button_:

#91 (comment)
@mrnugget mrnugget mentioned this pull request Jan 28, 2020
Use a temp file with .md extension for 'campaigns create' #92
Merged
mrnugget added a commit that referenced this pull request Jan 28, 2020
@mrnugget
Use a temp file with .md extension for 'campaigns create' (#92)
da26c32
This implements the suggestion by @keegancsmith that I saw _in the
exact same moment that I hit the merge button_:

#91 (comment)
scjohns pushed a commit that referenced this pull request Apr 24, 2023
@mrnugget
Use $EDITOR to define campaign name/desc if not given (#91)
97661f3
* Use $EDITOR to define campaign name/desc if not given

This opens a template markdown file in $EDITOR if either no `-name` or
no `-desc` are given on the command line.

* Get rid of comment char

* Change friendly message to use interactive version

* Create easier to undestand error when $EDITOR is not set

* Change usage information for 'campaign create'

* Fix typo and use Getenv instead of ExpandEnv
scjohns pushed a commit that referenced this pull request Apr 24, 2023
@mrnugget
Use a temp file with .md extension for 'campaigns create' (#92)
ca91758
This implements the suggestion by @keegancsmith that I saw _in the
exact same moment that I hit the merge button_:

#91 (comment)
DevStar411112 added a commit to DevStar411112/src-cli that referenced this pull request Oct 13, 2025
@DevStar411112
Use a temp file with .md extension for 'campaigns create'
505c03a
This implements the suggestion by @keegancsmith that I saw _in the
exact same moment that I hit the merge button_:

sourcegraph/src-cli#91 (comment)
@keegancsmith
keegancsmith deleted the create-campaign-editor branch November 11, 2025 20:52
@marcleblanc2 marcleblanc2 mentioned this pull request Oct 30, 2026
chore/deps: patch Trivy and Dependabot findings preparing for release #1383
Merged
marcleblanc2 added a commit that referenced this pull request Nov 3, 2026
@marcleblanc2 @ampagent
chore/deps: patch Trivy and Dependabot findings preparing for release (…
d613971
…#1383)

* chore/deps: patch all open Trivy and Dependabot findings

Bump golang.org/x/{crypto,net,text,mod}, github.com/klauspost/compress,
github.com/go-jose/go-jose/v4, google.golang.org/grpc, and
go.opentelemetry.io/otel/sdk in go.mod and lib/go.mod so that
`trivy fs --severity HIGH,CRITICAL` is clean and Dependabot alerts
#91-#96 close. No code changes.

* chore/renovate: fix invalid JSON in renovate.json

A doubled comma after the "$schema" key made renovate.json unparseable,
so Renovate stopped opening PRs for this repository.

Fixes #1345

* snapshot upload: use option.WithAuthCredentialsFile

google.golang.org/api v0.264.0 deprecates option.WithCredentialsFile
(staticcheck SA1019), which failed the go-lint job. The credentials file
is a service account key, so load it as that type explicitly.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18b16-df86-7399-a300-979289761a30
Co-authored-by: Amp <[email protected]>

---------

Co-authored-by: Amp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@keegancsmith keegancsmith keegancsmith left review comments
@ryanslade ryanslade Awaiting requested review from ryanslade
@tsenart tsenart Awaiting requested review from tsenart
@kzh kzh Awaiting requested review from kzh
@felixfbecker felixfbecker Awaiting requested review from felixfbecker
@eseliger eseliger Awaiting requested review from eseliger
+1 more reviewer
@sqs sqs sqs approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mrnugget @sqs @keegancsmith
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.