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

feat(api): add workflow default tags after add repository webhook #2465

Merged
merged 4 commits into from
Mar 30, 2018

Conversation

bnjjj
Copy link
Contributor

@bnjjj bnjjj commented Mar 24, 2018

Signed-off-by: Benjamin Coenen benjamin.coenen@hotmail.com

  1. Description
    add workflow default tags after add repository webhook
  2. Related issues
    close Automatic workflow tag #2448
  3. About tests
  4. Mentions

@ovh/cds

Signed-off-by: Benjamin Coenen <benjamin.coenen@hotmail.com>
Copy link
Member

@fsamin fsamin left a comment

Choose a reason for hiding this comment

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

I think this must be related to payload:

  • if default payload has "git.branch", "git.author", "git.hash"; update the default tags if its empty.

then:

  • Migration of all workflows

after all:

  • check this with a unit test


for _, wf := range workflows {
tx, errTx := db.Begin()
if errTx != nil {
Copy link
Member

Choose a reason for hiding this comment

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

don't you have to lock the workflow ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I only lock the metadata of the workflow

Copy link
Member

Choose a reason for hiding this comment

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

fine


for _, wf := range workflows {
tx, errTx := db.Begin()
if errTx != nil {
Copy link
Member

Choose a reason for hiding this comment

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

fine

@bnjjj
Copy link
Contributor Author

bnjjj commented Mar 29, 2018

tested on preprod with success

@yesnault yesnault merged commit 0867d44 into master Mar 30, 2018
@bnjjj bnjjj deleted the feat_#2448 branch May 1, 2018 12:51
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.

Automatic workflow tag
4 participants