Skip to content

Commit

Permalink
bump version, merge cml-pr-name-fix-branch-name
Browse files Browse the repository at this point in the history
- closes #553
  • Loading branch information
casperdcl committed May 24, 2021
2 parents dfda564 + 06db544 commit 3cbbce0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dvcorg/cml",
"version": "0.4.2",
"version": "0.4.3",
"author": {
"name": "DVC",
"url": "http://cml.dev"
Expand Down
12 changes: 9 additions & 3 deletions src/drivers/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ const {
GITHUB_EVENT_NAME
} = process.env;

const branch_name = (branch) => {
if (!branch) return;

return branch.replace(/refs\/(head|tag)s\//, '');
};

const owner_repo = (opts) => {
let owner, repo;
const { uri } = opts;
Expand Down Expand Up @@ -276,8 +282,8 @@ class Github {
} = pr;
return {
url,
source,
target
source: branch_name(source),
target: branch_name(target)
};
});
}
Expand All @@ -290,7 +296,7 @@ class Github {
}

get branch() {
return GITHUB_REF;
return branch_name(GITHUB_REF);
}

get user_email() {
Expand Down

8 comments on commit 3cbbce0

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Test Comment

CML watermark

Please sign in to comment.