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

github_webhook: Don't include secret in the config if it's absent #5994

Merged
merged 4 commits into from
Feb 25, 2023

Conversation

dima1206
Copy link
Contributor

SUMMARY

Currently if you don't have a secret for the hook, the module will always report changed status even after multiple runs. This change adds secret to the config only if user specifies it.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

github_webhook

ADDITIONAL INFORMATION

I've tested the change locally:

  • if user doesn't provide secret - it doesn't report changed state anymore on the second run
  • if user provides empty secret - it doesn't report changed state anymore on the second run
  • if there was a secret before, and user doesn't provide a secret in the task - it will remove the secret (same as before this change)

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) source_control labels Feb 15, 2023
@dima1206
Copy link
Contributor Author

What is ansible/third-party-check and why does it fail?

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels Feb 16, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! A first quick comment:

plugins/modules/github_webhook.py Outdated Show resolved Hide resolved
Co-authored-by: Felix Fontein <felix@fontein.de>
@felixfontein
Copy link
Collaborator

What is ansible/third-party-check and why does it fail?

Simply ignore that. It currently does that a lot.

@felixfontein
Copy link
Collaborator

Looks OK to me. Will merge this weekend if nobody objects.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Feb 25, 2023
@felixfontein felixfontein merged commit 1877ef1 into ansible-collections:main Feb 25, 2023
@patchback
Copy link

patchback bot commented Feb 25, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/1877ef1510175566c5ce08129929c0fe253d67ff/pr-5994

Backported as #6087

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Feb 25, 2023
)

* github_webhook: Don't include secret in the config if it's absent

* Add changelogs

* Fix indentation

* Apply suggestion to simplify the check

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: dima1206 <�32818228+dima1206@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1877ef1)
@patchback
Copy link

patchback bot commented Feb 25, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/1877ef1510175566c5ce08129929c0fe253d67ff/pr-5994

Backported as #6088

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@dima1206 thank you very much for your contribution!

patchback bot pushed a commit that referenced this pull request Feb 25, 2023
)

* github_webhook: Don't include secret in the config if it's absent

* Add changelogs

* Fix indentation

* Apply suggestion to simplify the check

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: dima1206 <�32818228+dima1206@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1877ef1)
felixfontein pushed a commit that referenced this pull request Feb 25, 2023
…secret in the config if it's absent (#6087)

github_webhook: Don't include secret in the config if it's absent (#5994)

* github_webhook: Don't include secret in the config if it's absent

* Add changelogs

* Fix indentation

* Apply suggestion to simplify the check

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: dima1206 <�32818228+dima1206@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1877ef1)

Co-authored-by: dima1206 <32818228+dima1206@users.noreply.github.com>
felixfontein pushed a commit that referenced this pull request Feb 25, 2023
…secret in the config if it's absent (#6088)

github_webhook: Don't include secret in the config if it's absent (#5994)

* github_webhook: Don't include secret in the config if it's absent

* Add changelogs

* Fix indentation

* Apply suggestion to simplify the check

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: dima1206 <�32818228+dima1206@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 1877ef1)

Co-authored-by: dima1206 <32818228+dima1206@users.noreply.github.com>
@github-actions
Copy link

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

jikamens pushed a commit to jikamens/community.general that referenced this pull request Feb 25, 2023
…sible-collections#5994)

* github_webhook: Don't include secret in the config if it's absent

* Add changelogs

* Fix indentation

* Apply suggestion to simplify the check

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: dima1206 <�32818228+dima1206@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) source_control
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants