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

Support labels configuration for Github Pull Request #350

Merged
merged 11 commits into from
Nov 11, 2021

Conversation

olblak
Copy link
Member

@olblak olblak commented Nov 5, 2021

Support labels configuration for Github Pull Request

Fix #108

! This pull request introduces some refactoring to automatically re-opened a pull request in a closed.

Allow specifying a new block configuration "pullrequest" via updatecli config.

All settings in the pullRequest are optional!

labels - Allow specifying labels when creating a new pullrequest.

! labels must already exist otherwise they are just

      scm:
        github:
          user: "{{ .github.user }}"
          email: "{{ .github.email }}"
          owner: "{{ .github.owner }}"
          repository: "{{ .github.repository }}"
          token: "{{ requiredEnv .github.token }}"
          username: "{{ .github.username }}"
          branch: "{{ .github.branch }}"
          pullRequest:
            description: |
              Loprem ipsum
            labels:
              - documentation

Test

To test this pull request, you can run the following commands:

  cp pkg/plugins/github/
  go test .

Additionnal Information

Tradeoff

Considering that we can have different parameters to configure a new pullRequest, I decided to have a specific block for better clarity.

Potential improvement

Allow specifying assignee/project

Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak added target Related to updatecli target scm-github SCM of type GiHhub enhancement New feature or request labels Nov 5, 2021
@olblak olblak marked this pull request as draft November 5, 2021 15:25
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak marked this pull request as ready for review November 5, 2021 22:32
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

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

Sounds good ! Code review is ok for me (only nitpicking comments).

Haven't tried a lot of cases, let's see ho it behaves.

Co-authored-by: Damien Duportal <damien.duportal@gmail.com>
@olblak
Copy link
Member Author

olblak commented Nov 7, 2021

Sounds good ! Code review is ok for me (only nitpicking comments).

Thanks for reviewing, coming days will be pretty busy for me so I am planning to merge this PR after Wednesday

@olblak olblak enabled auto-merge (squash) November 11, 2021 15:38
@olblak olblak merged commit de8b75e into updatecli:main Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scm-github SCM of type GiHhub target Related to updatecli target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support labels in updatecli values
2 participants