Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

run go mod tidy (and set Go 1.15) and gofmt -s in copy workflow - #42

Merged
marten-seemann merged 3 commits into
masterfrom
gofmt-and-go-mod-tidy
Apr 1, 2021
Merged

marten-seemann merged 3 commits into
masterfrom
gofmt-and-go-mod-tidy

Conversation

@marten-seemann

Copy link
Copy Markdown
Contributor

No description provided.

@Stebalien

Copy link
Copy Markdown
Member

Nice! We could also consider running go fix later, but we can do that if we see something in the go release notes that might require it.

Comment thread .github/workflows/copy-workflow.yml Resolved
if ! git diff --quiet; then
git add .
git commit -m "run gofmt -s"
echo "NEEDS_UPDATE=1" >> $GITHUB_ENV

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I kinda wonder if you could later just ask git "are there any commits ahead of the upstream branch?" instead of using NEEDS_UPDATE. Unrelated to this change though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As we're committing to master here, we could just check if HEAD != origin/master. Just need to figure out an elegant way to pull that out of git.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will do that in a separate PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good :) all LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants