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

Fixes annotation bug which used to err out on string value #379

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

sm43
Copy link
Contributor

@sm43 sm43 commented Dec 7, 2021

previoulsy, when the annotation are not array but a string :
eg. pipelinesascode.tekton.dev/on-event: "pull_request"
pac used to err out.
This patch fixes that and now allows single string along
with array of string.
eg. ["foo", "bar"], ["foo"] or "foo"

Closes #374

Signed-off-by: Shivam Mukhade [email protected]

@chmouel
Copy link
Member

chmouel commented Dec 7, 2021

Sounds good! let's wait to have the pac cluster to come back up and test it.

in the meantime any chance to update the documentation with the multiple format supported?

you can maybe add a single task reference in the e2e template so we can test it too on e2e, for example :

pipelinesascode.tekton.dev/task-2: "pylint" 

@chmouel
Copy link
Member

chmouel commented Dec 7, 2021

/retest

@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2021

Codecov Report

Merging #379 (913e03b) into main (8fadd2b) will decrease coverage by 0.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #379      +/-   ##
==========================================
- Coverage   70.79%   70.51%   -0.28%     
==========================================
  Files          50       50              
  Lines        2568     2581      +13     
==========================================
+ Hits         1818     1820       +2     
- Misses        573      582       +9     
- Partials      177      179       +2     
Impacted Files Coverage Δ
pkg/matcher/annotation_matcher.go 97.46% <100.00%> (-2.54%) ⬇️
pkg/matcher/repo_runinfo_matcher.go 66.66% <0.00%> (-13.34%) ⬇️
pkg/formatting/vcs.go 90.00% <0.00%> (-2.86%) ⬇️
pkg/consoleui/interface.go 0.00% <0.00%> (ø)

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 8fadd2b...913e03b. Read the comment docs.

@sm43
Copy link
Contributor Author

sm43 commented Dec 7, 2021

/retest

docs/guide.md Outdated Show resolved Hide resolved
docs/guide.md Outdated Show resolved Hide resolved
previoulsy, when the annotation are not array but a string :
eg.  pipelinesascode.tekton.dev/on-event: "pull_request"
pac used to err out.
This patch fixes that and now allows single string along
with array of string.
eg. ["foo", "bar"], ["foo"] or "foo"

Signed-off-by: Shivam Mukhade <[email protected]>
@nikhil-thomas
Copy link
Member

/lgtm

@chmouel chmouel merged commit b2ee645 into openshift-pipelines:main Dec 8, 2021
@sm43 sm43 deleted the fix-annotation-validation branch April 4, 2022 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

annotations in pipeline are in wrong format"
4 participants