-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: Enable "renovate changeset" action to work with dependabot #153
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as core from '@actions/core'; | ||
|
||
export const getDependencyManager = (): string => { | ||
return core | ||
.getInput('dependency-manager', { | ||
required: false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's set with a default in the yaml file. But still marked as not required here? What's even the return type here, can |
||
}) | ||
.trim() | ||
.toLowerCase(); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,20 +7,21 @@ import { | |
getChangedFiles, | ||
getChangesetFilename, | ||
listPackages, | ||
} from './renovateChangesets'; | ||
} from './manageChangesets'; | ||
import { relative as relativePath, resolve as resolvePath } from 'path'; | ||
import { getDependencyManager } from './dependencyConfig'; | ||
|
||
async function main() { | ||
core.info('Running Renovate Changesets'); | ||
core.info(`Running ${getDependencyManager()} Changesets`); | ||
|
||
const isMultipleWorkspaces = core.getBooleanInput('multiple-workspaces', { | ||
required: false, | ||
}); | ||
|
||
const branchName = await getBranchName(); | ||
|
||
if (!branchName.startsWith('renovate/')) { | ||
core.info('Not a renovate branch, skipping'); | ||
if (!branchName.startsWith(getDependencyManager())) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. forgot the slash here |
||
core.info(`Not a ${getDependencyManager()} branch, skipping`); | ||
return; | ||
} | ||
|
||
|
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.
The action is still named
renovate-changesets
though.Hm. Should we make a new parallel one that has this new ability (and is named
dependency-manager-changesets
)? Possibly deprecating the existing one later down the line in a separate PR.Alternatively: Should we instead make a new parallel one specifically named
dependabot-changesets
and leave the old one intact?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.
The former would require some upstream changes.
The latter would probably create more duplicated code (or the need to share code)