Skip to content

Commit 496c556

Browse files
authored
do this
1 parent c2e158c commit 496c556

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,8 @@ a premade action like [actions4git/setup-git] to configure the `user.name` and
129129
can be a multiline string if you want to specify a title and body. The default
130130
is 'Automated changes'.
131131

132-
- **`push-repository`:** The first argument to
133-
`git push [repository] [refspec]`. You can change this to another remote name
134-
like `upstream` (as long as you have push rights) or another Git remote
135-
entirely like `https://github.com/octocat/another-repo.git`. The default
136-
`origin` is probably what you want.
137-
138-
- **`push-refspec`:** A specific branch or tag name to push to. If unset, this
139-
will just run `git push [repository]` with no refspec. Defaults to unset.
140-
141132
- **`push-force`:** Whether or not to use the `--force` parameter when doing the
142-
`git push`. You may need to specify this if you are rewriting history or
143-
editing a tag. Defaults to `false`.
133+
`git push`. Defaults to `false`.
144134

145135
### Outputs
146136

action.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,10 @@ inputs:
7272
string if you want to specify a title and body. The default is 'Automated
7373
changes'.
7474
default: Automated changes
75-
push-repository:
76-
description: >
77-
The first argument to 'git push [repository] [refspec]'. You can change
78-
this to another remote name like 'upstream' (as long as you have push
79-
rights) or another Git remote entirely like
80-
'https://github.com/octocat/another-repo.git'. The default 'origin' is
81-
probably what you want.
82-
default: origin
83-
push-refspec:
84-
description: >
85-
A specific branch or tag name to push to. If unset, this will just run
86-
'git push [repository]' with no refspec. Defaults to unset.
8775
push-force:
8876
description: >
8977
Whether or not to use the '--force' parameter when doing the 'git push'.
90-
You may need to specify this if you are rewriting history or editing a
91-
tag. Defaults to 'false'.
78+
Defaults to 'false'.
9279
default: false
9380

9481
outputs:

src/main.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ commit: {
111111
}
112112

113113
push: {
114-
const pushRepository = core.getInput("push-repository");
115-
let pushRefspec = core.getInput("push-refspec") || null;
114+
// const pushRepository = core.getInput("push-repository");
115+
// let pushRefspec = core.getInput("push-refspec") || null;
116116
let pushForce = core.getBooleanInput("push-force");
117117

118118
const { stdout } = await $({
@@ -126,9 +126,7 @@ push: {
126126
await $({
127127
stdio: "inherit",
128128
cwd: rootPath,
129-
})`git push ${pushForce ? "--force" : []} ${pushRepository} ${
130-
pushRefspec ? pushRefspec : []
131-
}`;
129+
})`git push ${pushForce ? "--force" : []}`;
132130

133131
core.setOutput("pushed", true);
134132
}

0 commit comments

Comments
 (0)