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

Allow absolute project dirs and fix AZDO #888

Merged
merged 2 commits into from
Jan 3, 2020
Merged

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Jan 2, 2020

Previously, we wouldn't modify the config

    project: /a/b/c

and would use the absolute directory.

Now we prepend ./ and then run Clean() to ensure that every project dir
is relative.

This PR also fixes AZDO to return relative paths from its GetModifiedFiles() function to match the rest of the VCS's.

Fixes #849

Previously, we wouldn't modify the config
    project: /a/b/c
and would use the absolute directory.

Now we prepend ./ and then run Clean() to ensure that every project dir
is relative.
@codecov
Copy link

codecov bot commented Jan 2, 2020

Codecov Report

Merging #888 into master will increase coverage by 0.15%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #888      +/-   ##
==========================================
+ Coverage   71.69%   71.85%   +0.15%     
==========================================
  Files          65       65              
  Lines        5271     5244      -27     
==========================================
- Hits         3779     3768      -11     
+ Misses       1198     1189       -9     
+ Partials      294      287       -7
Impacted Files Coverage Δ
server/events/vcs/github_client.go 78.81% <ø> (ø) ⬆️
server/events/vcs/bitbucketcloud/client.go 47.32% <ø> (ø) ⬆️
server/events/vcs/gitlab_client.go 39.31% <ø> (ø) ⬆️
server/events/vcs/bitbucketserver/client.go 35.29% <ø> (ø) ⬆️
server/events/yaml/raw/project.go 100% <100%> (ø) ⬆️
server/events/vcs/azuredevops_client.go 73.75% <50%> (+3.96%) ⬆️
server/server.go 63.58% <0%> (+0.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7046fa...4e8d19b. Read the comment docs.

Previously the AZDO paths returned by GetModifiedFiles were absolute.
Now they're relative to the repo root to match the rest of the VCS's.
@lkysow lkysow changed the title Allow absolute project dirs Allow absolute project dirs and fix AZDO Jan 2, 2020
@lkysow
Copy link
Member Author

lkysow commented Jan 2, 2020

@mcdafydd can you take a look at this?

@mcdafydd
Copy link
Contributor

mcdafydd commented Jan 3, 2020

Thanks, @lkysow. Looks fine to me.

@lkysow lkysow merged commit 4078357 into master Jan 3, 2020
@lkysow lkysow deleted the project-leading-slash branch January 3, 2020 15:58
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.

Azure DevOps - "0 projects are to be planned based on their when_modified config"
2 participants