Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30954,26 +30954,33 @@ class IssueRepository {
constructor() {
this.startConfigPattern = '<!-- GIT-BOARD-CONFIG-START';
this.endConfigPattern = 'GIT-BOARD-CONFIG-END -->';
this.updateTitle = async (owner, repository, issueTitle, issueNumber, branchManagementEmoji, labels, token) => {
this.updateTitle = async (owner, repository, issueTitle, issueNumber, branchManagementAlways, branchManagementEmoji, labels, token) => {
try {
const octokit = github.getOctokit(token);
let emoji = '🤖';
if (labels.isHotfix) {
const branched = branchManagementAlways || labels.containsBranchedLabel;
if (labels.isHotfix && branched) {
emoji = `🔥${branchManagementEmoji}`;
}
else if (labels.isRelease) {
else if (labels.isRelease && branched) {
emoji = `🚀${branchManagementEmoji}`;
}
else if (labels.isBugfix) {
else if ((labels.isBugfix || labels.isBug) && branched) {
emoji = `🐛${branchManagementEmoji}`;
}
else if (labels.isFeature) {
else if ((labels.isFeature || labels.isEnhancement) && branched) {
emoji = `✨${branchManagementEmoji}`;
}
else if (labels.isBug) {
else if (labels.isHotfix) {
emoji = '🔥';
}
else if (labels.isRelease) {
emoji = '🚀';
}
else if (labels.isBugfix || labels.isBug) {
emoji = '🐛';
}
else if (labels.isEnhancement) {
else if (labels.isFeature || labels.isEnhancement) {
emoji = '✨';
}
else if (labels.isHelp) {
Expand Down Expand Up @@ -33029,7 +33036,7 @@ class UpdateTitleUseCase {
try {
if (param.isIssue) {
if (param.emoji.emojiLabeledTitle) {
const title = await this.issueRepository.updateTitle(param.owner, param.repo, param.issue.title, param.issue.number, param.emoji.branchManagementEmoji, param.labels, param.tokens.token);
const title = await this.issueRepository.updateTitle(param.owner, param.repo, param.issue.title, param.issue.number, param.branchManagementAlways, param.emoji.branchManagementEmoji, param.labels, param.tokens.token);
if (title) {
result.push(new result_1.Result({
id: this.taskId,
Expand Down
21 changes: 14 additions & 7 deletions src/data/repository/issue_repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class IssueRepository {
repository: string,
issueTitle: string,
issueNumber: number,
branchManagementAlways: boolean,
branchManagementEmoji: string,
labels: Labels,
token: string,
Expand All @@ -22,17 +23,23 @@ export class IssueRepository {

let emoji = '🤖';

if (labels.isHotfix) {
const branched = branchManagementAlways || labels.containsBranchedLabel

if (labels.isHotfix && branched) {
emoji = `🔥${branchManagementEmoji}`;
} else if (labels.isRelease) {
} else if (labels.isRelease && branched) {
emoji = `🚀${branchManagementEmoji}`;
} else if (labels.isBugfix) {
} else if ((labels.isBugfix || labels.isBug) && branched) {
emoji = `🐛${branchManagementEmoji}`;
} else if (labels.isFeature) {
} else if ((labels.isFeature || labels.isEnhancement) && branched) {
emoji = `✨${branchManagementEmoji}`;
} else if (labels.isBug) {
} else if (labels.isHotfix) {
emoji = '🔥';
} else if (labels.isRelease) {
emoji = '🚀';
} else if (labels.isBugfix || labels.isBug) {
emoji = '🐛';
} else if (labels.isEnhancement) {
} else if (labels.isFeature || labels.isEnhancement) {
emoji = '✨';
} else if (labels.isHelp) {
emoji = '🆘';
Expand Down Expand Up @@ -358,7 +365,7 @@ ${this.endConfigPattern}`;
token: string,
) => {
const octokit = github.getOctokit(token);
const { data: issue } = await octokit.rest.issues.get({
const {data: issue} = await octokit.rest.issues.get({
owner: owner,
repo: repository,
issue_number: issueNumber,
Expand Down
1 change: 1 addition & 0 deletions src/data/usecase/steps/update_title_use_case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class UpdateTitleUseCase implements ParamUseCase<Execution, Result[]> {
param.repo,
param.issue.title,
param.issue.number,
param.branchManagementAlways,
param.emoji.branchManagementEmoji,
param.labels,
param.tokens.token,
Expand Down