Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Actions deprecations #1316

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

frenchy64
Copy link
Contributor

@frenchy64 frenchy64 commented Oct 19, 2022

Related zero88/gh-project-context#45
Related https://github.com/advthreat/iroh/pull/7176
Related https://github.com/advthreat/iroh/issues/7218

set-output is deprecated: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

The gh-project-context Action is upgraded to avoid the deprecated Node 12: zero88/gh-project-context#45

§ QA

No QA is needed.

§ Release Notes

intern: Resolve Actions deprecations

§ Squashed Commits

Copy link
Contributor

@brookeswanson brookeswanson left a comment

Choose a reason for hiding this comment

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

I added a couple small comments, feel free to ignore, otherwise this seems sensible.

Comment on lines +32 to +36
(let [github-output-file (File/createTempFile "github-output" nil)
{:keys [grab-history utils]} (th/mk-utils {"GITHUB_OUTPUT" (.getPath github-output-file)})
_ (sut/set-output utils "foo" "bar")
_ (is (empty? (grab-history)))
_ (is (= "foo=bar\n" (slurp github-output-file)))]))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
(let [github-output-file (File/createTempFile "github-output" nil)
{:keys [grab-history utils]} (th/mk-utils {"GITHUB_OUTPUT" (.getPath github-output-file)})
_ (sut/set-output utils "foo" "bar")
_ (is (empty? (grab-history)))
_ (is (= "foo=bar\n" (slurp github-output-file)))]))
(let [github-output-file (File/createTempFile "github-output" nil)
{:keys [grab-history utils]} (th/mk-utils {"GITHUB_OUTPUT" (.getPath github-output-file)})]
(sut/set-output utils "foo" "bar")
(is (empty? (grab-history)))
(is (= "foo=bar\n" (slurp github-output-file)))))

Can we pull these out of the body of the let?

(set-output
n
(json/generate-string v {:pretty false})))
(set-output utils n (json/generate-string v {:pretty false})))
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer the encode/decode pattern but it doesn't really matter.

Suggested change
(set-output utils n (json/generate-string v {:pretty false})))
(set-output utils n (json/encode v)))

Copy link
Contributor

@ereteog ereteog left a comment

Choose a reason for hiding this comment

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

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Developer facing changes review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants