Skip to content

Commit

Permalink
Changed branch to the repo's default branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Techforchange committed Sep 28, 2017
1 parent b717980 commit df7ee3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/get-commit.js
Expand Up @@ -11,7 +11,7 @@ function getCommit (state) {

.then(function (result) {
const {filename, patch, blob_url} = result.data.files[0]
var newBlobUrl = blob_url.replace(/(?:blob)(.+)(?=\/)/g, 'blob/' + state.branch)
var newBlobUrl = blob_url.replace(/(?:blob)(.+)(?=\/)/g, 'blob/' + state.repoDefaultBranch)

state.commit = {
message: result.data.commit.message,
Expand Down
3 changes: 2 additions & 1 deletion lib/handle-create-event.js
Expand Up @@ -34,7 +34,8 @@ function handleCreateEvent (context) {
branch: ref,
template,
labels: ['first-timers-only', 'hacktoberfest'],
sha: null
sha: null,
repoDefaultBranch: repository.default_branch
}

getBranch(state)
Expand Down

0 comments on commit df7ee3a

Please sign in to comment.