Skip to content

Commit

Permalink
Removing custom branch name as it is now available in upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Vacha Shah <[email protected]>
  • Loading branch information
VachaShah committed Oct 24, 2022
1 parent 7f65e12 commit a1d89dc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
)
)
steps:
- uses: tibdex/backport@v2
- uses: VachaShah/backport@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ For example, if a pull request has the labels `backport staging` and `backport p

This fork has some new features on top of the original Github Action. Following is a list of new features and how to use them:

1. `branch_name`: This optional input option can be added to the Github Action in order to pass custom branch name prefixes for the backport pull requests. For example, if `branch_name` is `auto/backport-${pull_request_number}`, the branch created for backport pull requests will be `auto/backport-${pull_request_number}-to-${base}`. The default is `backport-${pullRequestNumber}-to-${base}`.
1. `files_to_skip`: This optional input option can be added to the Github Action in order to pass a list of files that can be skipped during backport.
3 changes: 0 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ inputs:
files_to_skip:
description: Comma seperated list of files to be skipped from the backport
required: false
branch_name:
description: Custom branch name for the backport PR.
required: false
github_token:
description: Token for the GitHub API.
required: true
Expand Down
4 changes: 1 addition & 3 deletions src/backport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ const getFailedBackportCommentBody = ({
};

const backport = async ({
branchName,
filesToSkip,
getBody,
getHead,
Expand All @@ -194,7 +193,6 @@ const backport = async ({
payload,
token,
}: {
branchName: string,
filesToSkip: string[];
getBody: (
props: Readonly<{
Expand Down Expand Up @@ -284,7 +282,7 @@ const backport = async ({
mergeCommitSha,
number,
});
const head = (branchName != null) ? branchName : getHead({ base, number });
const head = getHead({ base, number });
const labels = getLabels({
base,
labels: originalLabels
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const run = async () => {
const labelRegExp = new RegExp(labelPattern);

const token = getInput("github_token", { required: true });
const branchName = getInput("branch_name");
const filesInput = getInput("files_to_skip");
const filesToSkip = getFilesToSkip(filesInput);

Expand All @@ -51,7 +50,6 @@ const run = async () => {
}

const createdPullRequestBaseBranchToNumber = await backport({
branchName,
filesToSkip,
getBody,
getHead,
Expand Down

0 comments on commit a1d89dc

Please sign in to comment.