Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
applications
renovate
Commits
9a55d753
Unverified
Commit
9a55d753
authored
1 year ago
by
Sergei Zharinov
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
feat(onboarding): Semantic onboarding PR (#25666)
parent
e9a2da0d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/workers/repository/onboarding/pr/index.spec.ts
+17
-0
17 additions, 0 deletions
lib/workers/repository/onboarding/pr/index.spec.ts
lib/workers/repository/onboarding/pr/index.ts
+7
-1
7 additions, 1 deletion
lib/workers/repository/onboarding/pr/index.ts
with
24 additions
and
1 deletion
lib/workers/repository/onboarding/pr/index.spec.ts
+
17
−
0
View file @
9a55d753
...
@@ -77,6 +77,23 @@ describe('workers/repository/onboarding/pr/index', () => {
...
@@ -77,6 +77,23 @@ describe('workers/repository/onboarding/pr/index', () => {
expect
(
platform
.
createPr
).
toHaveBeenCalledTimes
(
1
);
expect
(
platform
.
createPr
).
toHaveBeenCalledTimes
(
1
);
});
});
it
(
'
creates semantic PR
'
,
async
()
=>
{
await
ensureOnboardingPr
(
{
...
config
,
semanticCommitType
:
undefined
,
// should default to "chore"
semanticCommits
:
'
enabled
'
,
},
packageFiles
,
branches
,
);
expect
(
platform
.
createPr
).
toHaveBeenCalledWith
(
expect
.
objectContaining
({
prTitle
:
'
chore: Configure Renovate
'
,
}),
);
});
it
(
'
creates PR with labels
'
,
async
()
=>
{
it
(
'
creates PR with labels
'
,
async
()
=>
{
await
ensureOnboardingPr
(
await
ensureOnboardingPr
(
{
{
...
...
This diff is collapsed.
Click to expand it.
lib/workers/repository/onboarding/pr/index.ts
+
7
−
1
View file @
9a55d753
...
@@ -173,10 +173,16 @@ If you need any further assistance then you can also [request help here](${
...
@@ -173,10 +173,16 @@ If you need any further assistance then you can also [request help here](${
logger
.
info
(
'
DRY-RUN: Would create onboarding PR
'
);
logger
.
info
(
'
DRY-RUN: Would create onboarding PR
'
);
}
else
{
}
else
{
// TODO #22198
// TODO #22198
const
prTitle
=
config
.
semanticCommits
===
'
enabled
'
?
`
${
config
.
semanticCommitType
??
'
chore
'
}
:
${
config
.
onboardingPrTitle
}
`
:
config
.
onboardingPrTitle
!
;
const
pr
=
await
platform
.
createPr
({
const
pr
=
await
platform
.
createPr
({
sourceBranch
:
config
.
onboardingBranch
!
,
sourceBranch
:
config
.
onboardingBranch
!
,
targetBranch
:
config
.
defaultBranch
!
,
targetBranch
:
config
.
defaultBranch
!
,
prTitle
:
config
.
onboardingPrTitle
!
,
prTitle
,
prBody
,
prBody
,
labels
,
labels
,
platformOptions
:
getPlatformPrOptions
({
platformOptions
:
getPlatformPrOptions
({
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment