-
-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
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.
I don't have time to test this, but if you add it to RGH even as a user/action#commit
we could test it tomorrow.
@@ -22,16 +16,25 @@ async function run() { | |||
const {stdout: t} = await execFile('git', ['tag', '-l', '--sort=-creatordate']); | |||
const tags = t.split('\n').filter(Boolean).map(tag => tag.trim()); | |||
|
|||
if (tags.length === 0) { |
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.
Currently it doesn't seem to support creating a release for the first tag (which is usually just "Initial release"), so this condition should reflect that, at least for the time being.
if (tags.length === 0) { | |
if (tags.length < 2) { |
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.
This is unchanged. Did you add support for "initial release" in the commit?
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.
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.
I'd prefer this to be just Initial release
but that works too, for the time being
Looks good, but can test this PR on refined-github/refined-github#3421, refined-github/github-url-detection#30 or fregante/browser-extension-template#37? So we're sure it works the way we want it to work. |
Will try this on fregante/browser-extension-template#37, as that looks like the best place to test this stuff without polluting other repositories. |
@@ -66,7 +72,7 @@ async function run() { | |||
releaseBody.push(`\n[\`${range}\`](https://github.com/${owner}/${repo}/compare/${range})`); | |||
} | |||
|
|||
const octokit = getOctokit(process.env.RELEASE_TOKEN); | |||
const octokit = getOctokit(core.getInput('token')); |
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.
You can use this package to automatically pickup the token: https://github.com/octokit/action.js
The readme doesn’t show with.token support but I just added it in a dependency: octokit/auth-action.js#106
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.
That sounds cool, do you want me to add this to #22?
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.
Doesn’t sound related 😃
Closes #1
ENV