Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for gist.github.com #262

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
gists: result.ref = refs/heads/master
  • Loading branch information
gnawhleinad committed Jun 17, 2020
commit aab364320b68b4e4130b759ca8982752d6e0c148
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -14518,6 +14518,9 @@ function getInputs() {
result.ref = `refs/heads/${result.ref}`;
}
}
if (result.isGist && !result.ref && !result.commit) {
result.ref = 'refs/heads/master';
}
}
// SHA?
else if (result.ref.match(/^[0-9a-fA-F]{40}$/)) {
4 changes: 4 additions & 0 deletions src/input-helper.ts
Original file line number Diff line number Diff line change
@@ -76,6 +76,10 @@ export function getInputs(): IGitSourceSettings {
result.ref = `refs/heads/${result.ref}`
}
}

if (result.isGist && !result.ref && !result.commit) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added this back from 00a3be8

let me know if you'd like me to change src/git-source-provider.ts instead.

result.ref = 'refs/heads/master'
}
}
// SHA?
else if (result.ref.match(/^[0-9a-fA-F]{40}$/)) {