Skip to content

Fix Travis deploy repo regex to only match .git at end#725

Merged
yamgent merged 1 commit into
MarkBind:masterfrom
Xenonym:fix/travis-repo-slug-regex-fix
Feb 22, 2019
Merged

Fix Travis deploy repo regex to only match .git at end#725
yamgent merged 1 commit into
MarkBind:masterfrom
Xenonym:fix/travis-repo-slug-regex-fix

Conversation

@Xenonym

@Xenonym Xenonym commented Feb 21, 2019

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [X] Bug fix

Resolves an issue discovered during a test of #701.

What is the rationale for this request?
The regex we use for matching GitHub repo slugs in Travis is incorrect and may make Travis push to the wrong repository. For example, our regex would incorrectly match https://github.com/MarkBind/markbind.github.io.git as MarkBind/markbind.git:

Incorrect Travis regex match

What changes did you make? (Give an overview)
I fixed the regex to only match .git at the end ($) and to match periods in the repository name.

Testing instructions:

  1. Specify a repo in site.json with a .git in the name. It should not match the .git in the name, only the end.
    Eg. https://github.com/MarkBind/markbind.github.io.git should match as MarkBind/markbind.github.io.git.

- match .git only at end of string
- match periods in repository name
@yamgent yamgent added this to the v1.19.1 milestone Feb 21, 2019
@yamgent yamgent changed the title Fix Travis repo regex to only match .git at end Fix Travis deploy repo regex to only match .git at end Feb 22, 2019
@yamgent yamgent merged commit e137a23 into MarkBind:master Feb 22, 2019
@Xenonym Xenonym deleted the fix/travis-repo-slug-regex-fix branch February 22, 2019 15:22
yamgent pushed a commit to yamgent/markbind that referenced this pull request Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants