Skip to content

Added support for pipeline bridges #1203

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

Merged
merged 2 commits into from
Oct 8, 2020

Conversation

intostern
Copy link

@intostern intostern commented Oct 2, 2020

Hi,

If you use child pipelines, in your project, i.e.:

security_scans:
  stage: security_scanning
  only:
    - master
  trigger:
    include:
      - local: ".gitlab-ci/security.yml"

,

then API call pipeline.jobs.list() doesn't include child pipelines into output.
There is a different API call for this: https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-bridges

With this PR you'll be able to exeute:
bridges = pipeline.bridges.list()

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this addition! :) I just added a few comments.

Would you mind adding some unit tests for this? You can find examples here: https://github.com/python-gitlab/python-gitlab/tree/master/gitlab/tests/objects

Also, to make the build green you will need to amend your commit message to comply with conventional commits, see instructions here: https://github.com/python-gitlab/python-gitlab/#development-workflow

Let me know if you get stuck.

@intostern intostern closed this Oct 7, 2020
@intostern
Copy link
Author

Need to re-create commit messages

@intostern intostern deleted the feat/bridge branch October 7, 2020 13:37
@nejch
Copy link
Member

nejch commented Oct 7, 2020

Need to re-create commit messages

@intostern You can force-push to the same branch after fixing/squashing, no need to close the pull request 😉 git push -f

@intostern intostern restored the feat/bridge branch October 7, 2020 16:37
@intostern intostern reopened this Oct 7, 2020
@intostern
Copy link
Author

Need to re-create commit messages

@intostern You can force-push to the same branch after fixing/squashing, no need to close the pull request 😉 git push -f

Thanks, will force-push

@intostern intostern force-pushed the feat/bridge branch 2 times, most recently from 8cdce6f to 2cdefe0 Compare October 7, 2020 17:27
@intostern intostern closed this Oct 7, 2020
@intostern intostern reopened this Oct 7, 2020
@codecov-io
Copy link

Codecov Report

Merging #1203 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1203      +/-   ##
==========================================
+ Coverage   77.50%   77.56%   +0.05%     
==========================================
  Files          11       11              
  Lines        2819     2826       +7     
==========================================
+ Hits         2185     2192       +7     
  Misses        634      634              
Impacted Files Coverage Δ
gitlab/v4/objects/__init__.py 79.12% <100.00%> (+0.07%) ⬆️

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 40ec2f5...05cbdc2. Read the comment docs.

@intostern
Copy link
Author

Hi @nejch ,

All done.

@max-wittig
Copy link
Member

Thanks for the MR. Looks good!

@max-wittig max-wittig merged commit c303dab into python-gitlab:master Oct 8, 2020
@zakhenry
Copy link

Hi I'd like to use this feature but it seems like it was merged since the latest release of this library. Is there a way to install a prerelease/nightly version so I can access this feature. Also is there any eta on this feature being released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants