mirror of
https://github.com/actions/checkout.git
synced 2026-03-10 09:01:44 +08:00
Compare commits
5 Commits
a072fe2d48
...
4393bd734c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4393bd734c | ||
|
|
8edcb1bdb4 | ||
|
|
09d2acae67 | ||
|
|
55ad59dfaa | ||
|
|
dedef103f1 |
@ -1 +1 @@
|
|||||||
* @actions/actions-launch
|
* @actions/actions-runtime
|
||||||
|
|||||||
18
README.md
18
README.md
@ -10,6 +10,24 @@ The auth token is persisted in the local git config. This enables your scripts t
|
|||||||
|
|
||||||
When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.
|
When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.
|
||||||
|
|
||||||
|
### Note
|
||||||
|
|
||||||
|
Thank you for your interest in this GitHub action, however, right now we are not taking contributions.
|
||||||
|
|
||||||
|
We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards other areas of Actions and are not taking contributions to this repository at this time. The GitHub public roadmap is the best place to follow along for any updates on features we’re working on and what stage they’re in.
|
||||||
|
|
||||||
|
We are taking the following steps to better direct requests related to GitHub Actions, including:
|
||||||
|
|
||||||
|
1. We will be directing questions and support requests to our [Community Discussions area](https://github.com/orgs/community/discussions/categories/actions)
|
||||||
|
|
||||||
|
2. High Priority bugs can be reported through Community Discussions or you can report these to our support team https://support.github.com/contact/bug-report.
|
||||||
|
|
||||||
|
3. Security Issues should be handled as per our [security.md](security.md)
|
||||||
|
|
||||||
|
We will still provide security updates for this project and fix major breaking changes during this time.
|
||||||
|
|
||||||
|
You are welcome to still raise bugs in this repo.
|
||||||
|
|
||||||
# What's new
|
# What's new
|
||||||
|
|
||||||
Please refer to the [release page](https://github.com/actions/checkout/releases/latest) for the latest release notes.
|
Please refer to the [release page](https://github.com/actions/checkout/releases/latest) for the latest release notes.
|
||||||
|
|||||||
@ -314,7 +314,7 @@ class GitCommandManager {
|
|||||||
line = line.trim()
|
line = line.trim()
|
||||||
if (line.startsWith('ref:') || line.endsWith('HEAD')) {
|
if (line.startsWith('ref:') || line.endsWith('HEAD')) {
|
||||||
return line
|
return line
|
||||||
.substr('ref:'.length, line.length - 'ref:'.length - 'HEAD'.length)
|
.slice('ref:'.length, line.length - 'HEAD'.length)
|
||||||
.trim()
|
.trim()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,11 +64,11 @@ export async function prepareExistingDirectory(
|
|||||||
if (ref) {
|
if (ref) {
|
||||||
ref = ref.startsWith('refs/') ? ref : `refs/heads/${ref}`
|
ref = ref.startsWith('refs/') ? ref : `refs/heads/${ref}`
|
||||||
if (ref.startsWith('refs/heads/')) {
|
if (ref.startsWith('refs/heads/')) {
|
||||||
const upperName1 = ref.toUpperCase().substr('REFS/HEADS/'.length)
|
const upperName1 = ref.toUpperCase().slice('REFS/HEADS/'.length)
|
||||||
const upperName1Slash = `${upperName1}/`
|
const upperName1Slash = `${upperName1}/`
|
||||||
branches = await git.branchList(true)
|
branches = await git.branchList(true)
|
||||||
for (const branch of branches) {
|
for (const branch of branches) {
|
||||||
const upperName2 = branch.substr('origin/'.length).toUpperCase()
|
const upperName2 = branch.slice('origin/'.length).toUpperCase()
|
||||||
const upperName2Slash = `${upperName2}/`
|
const upperName2Slash = `${upperName2}/`
|
||||||
if (
|
if (
|
||||||
upperName1.startsWith(upperName2Slash) ||
|
upperName1.startsWith(upperName2Slash) ||
|
||||||
|
|||||||
@ -43,7 +43,7 @@ function updateUsage(
|
|||||||
const newReadme: string[] = []
|
const newReadme: string[] = []
|
||||||
|
|
||||||
// Append the beginning
|
// Append the beginning
|
||||||
newReadme.push(originalReadme.substr(0, startTokenIndex + startToken.length))
|
newReadme.push(originalReadme.slice(0, startTokenIndex + startToken.length))
|
||||||
|
|
||||||
// Build the new usage section
|
// Build the new usage section
|
||||||
newReadme.push('```yaml', `- uses: ${actionReference}`, ' with:')
|
newReadme.push('```yaml', `- uses: ${actionReference}`, ' with:')
|
||||||
@ -68,9 +68,9 @@ function updateUsage(
|
|||||||
// Longer than width? Find a space to break apart
|
// Longer than width? Find a space to break apart
|
||||||
let segment: string = description
|
let segment: string = description
|
||||||
if (description.length > width) {
|
if (description.length > width) {
|
||||||
segment = description.substr(0, width + 1)
|
segment = description.slice(0, width + 1)
|
||||||
while (!segment.endsWith(' ') && !segment.endsWith('\n') && segment) {
|
while (!segment.endsWith(' ') && !segment.endsWith('\n') && segment) {
|
||||||
segment = segment.substr(0, segment.length - 1)
|
segment = segment.slice(0, -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trimmed too much?
|
// Trimmed too much?
|
||||||
@ -84,14 +84,14 @@ function updateUsage(
|
|||||||
// Check for newline
|
// Check for newline
|
||||||
const newlineIndex = segment.indexOf('\n')
|
const newlineIndex = segment.indexOf('\n')
|
||||||
if (newlineIndex >= 0) {
|
if (newlineIndex >= 0) {
|
||||||
segment = segment.substr(0, newlineIndex + 1)
|
segment = segment.slice(0, newlineIndex + 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append segment
|
// Append segment
|
||||||
newReadme.push(` # ${segment}`.trimRight())
|
newReadme.push(` # ${segment}`.trimRight())
|
||||||
|
|
||||||
// Remaining
|
// Remaining
|
||||||
description = description.substr(segment.length)
|
description = description.slice(segment.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input.default !== undefined) {
|
if (input.default !== undefined) {
|
||||||
@ -113,7 +113,7 @@ function updateUsage(
|
|||||||
newReadme.push('```')
|
newReadme.push('```')
|
||||||
|
|
||||||
// Append the end
|
// Append the end
|
||||||
newReadme.push(originalReadme.substr(endTokenIndex))
|
newReadme.push(originalReadme.slice(endTokenIndex))
|
||||||
|
|
||||||
// Write the new README
|
// Write the new README
|
||||||
fs.writeFileSync(readmePath, newReadme.join(os.EOL))
|
fs.writeFileSync(readmePath, newReadme.join(os.EOL))
|
||||||
|
|||||||
@ -282,6 +282,6 @@ function select(obj: any, path: string): any {
|
|||||||
return obj[path]
|
return obj[path]
|
||||||
}
|
}
|
||||||
|
|
||||||
const key = path.substr(0, i)
|
const key = path.slice(0, i)
|
||||||
return select(obj[key], path.substr(i + 1))
|
return select(obj[key], path.slice(i + 1))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user