johlju
February 4, 2020, 3:52pm
1
Description
When the webhook to Codecov.io is (mistakenly) removed in a public GitHub repo what is the easiest way to get it back? Preferably for a maintainer of the repo which does not have org permission to manage Codecov GitHub app.
Repository
Versions
not applicable
Additional Information
None
We were doing fine up to this part.
Assuming you have access to add a webhook, I wonder if revoking your OAuth and signing back to Codecov would do it. Failing that, you may need to look into settings a team bot Github App or Team Bot
Let me know if either of those work.
johlju
February 4, 2020, 4:13pm
3
Since CodeCov wasn’t working for us using Pester <=v4.9 have removed it in some repos. Now that it works we need to readd it again.
Maintainers do have the right to add webhooks, they are admins on the repos. But not finding any OAuth to remove.
In Codecov.io it says in Codecov
Codecov uses GitHub Webhooks to keep in sync with your project.
A webhook has been enabled through GitHub Integrations. No setup required.
I do have org permission to manage the GitHub App. Is there are an easy way for me to re-add the webhook in all repos that currently missing it? But I was hoping there was a way for the maintainers to just add the webhook to the GitHub repo settings webhook page.
I rather not use the Team Bot since GitHub App works perfectly.
You can try using the API https://docs.codecov.io/v4.4.0/reference#section-activate-repository to activate it, that may put the webhook back. I’m not sure without doing a code dive, which I don’t have the bandwidth for currently. (will add to my list if that doesn’t work, though)
johlju
February 5, 2020, 2:20pm
5
I tried but the result was:
{"meta": {"status": 400}, "error": {"reason": "You may only activate private repositories.", "context": null}}
Just noticed that on the repo settings on Codecov there should be a button to create the web hook back, do you see that?
johlju
February 5, 2020, 2:28pm
7
I can’t see a button that would do that. I browse to Codecov and under the “Genaral” tab there are a section “GitHub Webhook”, but it only have this text:
Codecov uses GitHub Webhooks to keep in sync with your project.
A webhook has been enabled through GitHub Integrations. No setup required.
Arg. Apparently my view is messing with me today.
It’s looking like the only solution is getting an org admin to toggle the app on GitHub, but I’m still looking for another solution.
johlju
February 6, 2020, 11:35am
10
The maintainer is currently adding the necessary steps to the pipeline to upload reports to Codecov.io . We will see if that will trigger the re-creation of the webhook (by the report is uploaded). Curious if the webhook is not needed when we have the GitHub App? Maybe the webhook in the other repos are something old before the GitHub App existed?
Based on the wording, I think it may be. I’d try uploading and see if things work correctly without it.
johlju
February 6, 2020, 1:38pm
12
It did upload correctly and it posted back to the PR:
dsccommunity:master
← X-Guardian:Add-CodeCov
opened 09:51AM - 06 Feb 20 UTC
#### Pull Request (PR) description
This PR enables [Codecov.io](https://codec… ov.io) support in the Azure DevOps CI/CD pipeline.
#### This Pull Request (PR) fixes the following issues
None
#### Task list
<!--
To aid community reviewers in reviewing and merging your PR, please take
the time to run through the below checklist and make sure your PR has
everything updated as required.
Change to [x] for each task in the task list that applies to your PR.
For those task that don't apply to you PR, leave those as is.
-->
- [x] Added an entry to the change log under the Unreleased section of the
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
- [ ] Resource documentation added/updated in README.md.
- [ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help.
- [ ] Comment-based help added/updated.
- [ ] Localization strings added/updated in all localization files as appropriate.
- [ ] Examples appropriately added/updated.
- [ ] Unit tests added/updated. See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
- [ ] Integration tests added/updated (where possible). See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
- [ ] New/changed code adheres to [DSC Community Style Guidelines](https://dsccommunity.org/styleguidelines).
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/dsccommunity/activedirectorydsc/562)
Just wondering now if we loose any functionality without the webhook. Though, if we do not need the webhook that is even better!
Codecov: Codecov
johlju
February 6, 2020, 2:56pm
13
Tried upload from a newer repository:
dsccommunity:master
← johlju:f/add-parameter-destinatiomodulepath
opened 02:25PM - 06 Feb 20 UTC
# Pull Request
### Pull Request (PR) description
- DscResource.DocGenerator
…
- Adding uploading coverage to Codecov.io.
- New-DscResourcePowerShellHelp
- Add new parameter `DestinationModulePath` to be able to set the path
to a built module (for example).
#### This Pull Request (PR) fixes the following issues
- Fixes #8
- Fixes #9
#### Task list
<!--
To aid community reviewers in reviewing and merging your PR, please take
the time to run through the below checklist and make sure your PR has
everything updated as required.
Change to [x] for each task in the task list that applies to your PR.
For those task that don't apply to you PR, leave those as is.
-->
- [x] Added an entry to the change log under the Unreleased section of the
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
- [x] Documentation added/updated in README.md.
- [x] Comment-based help added/updated.
- [ ] Localization strings added/updated in all localization files as appropriate.
- [ ] Examples appropriately added/updated.
- [x] Unit tests added/updated.
- [ ] Integration tests added/updated (where possible).
- [x] New/changed code adheres to [DSC Community Style Guidelines](https://dsccommunity.org/styleguidelines).
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/dsccommunity/dscresource.docgenerator/11)
It seems it uploaded the file:
https://dev.azure.com/dsccommunity/DscResource.DocGenerator/_build/results?buildId=925&view=logs&j=9c98dabf-a506-5435-4ead-dace7c1625a8&t=c251aece-c156-5cd3-dcec-645d5e596fc0
But on Codecov.io the PR does not show:
Codecov
johlju
February 6, 2020, 4:10pm
15
1 Like
johlju
February 6, 2020, 5:08pm
16
I update this repo (PR) as well, and it seems to work without the webhook. So this might have been a non-issue.
dsccommunity:master
← johlju:f/add-codecov
opened 04:49PM - 06 Feb 20 UTC
<!--
Thanks for submitting a Pull Request (PR) to this project.
Your c… ontribution to this project is greatly appreciated!
Please prefix the PR title with the resource name,
e.g. 'ResourceName: My short description'.
If this is a breaking change, then also prefix the PR title
with 'BREAKING CHANGE:',
e.g. 'BREAKING CHANGE: ResourceName: My short description'.
You may remove this comment block, and the other comment blocks, but please
keep the headers and the task list.
-->
#### Pull Request (PR) description
- GPRegistryPolicyDsc
- Add support to upload coverage to Codecov.io ([issue #16](https://github.com/dsccommunity/GPRegistryPolicyDsc/issues/16)).
- GPRegistryPolicyDsc
- Change the Azure Pipelines Microsoft Host Agents to use the image
`windows-2019` ([issue #15](https://github.com/dsccommunity/GPRegistryPolicyDsc/issues/15)).
#### This Pull Request (PR) fixes the following issues
- Fixes #15
- Fixes #16
#### Task list
<!--
To aid community reviewers in reviewing and merging your PR, please take
the time to run through the below checklist and make sure your PR has
everything updated as required.
Change to [x] for each task in the task list that applies to your PR.
For those task that don't apply to you PR, leave those as is.
-->
- [x] Added an entry to the change log under the Unreleased section of the
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
- [ ] Resource documentation added/updated in README.md.
- [ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help.
- [ ] Comment-based help added/updated.
- [ ] Localization strings added/updated in all localization files as appropriate.
- [ ] Examples appropriately added/updated.
- [x] Unit tests added/updated. See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
- [x] Integration tests added/updated (where possible). See [DSC Community Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines).
- [x] New/changed code adheres to [DSC Community Style Guidelines](https://dsccommunity.org/styleguidelines).
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/dsccommunity/gpregistrypolicydsc/17)
1 Like
You mean the note that “webhooks aren’t needed when using the app” might be true?
(to be 100% clear, I’m facepalming myself, not you. Very happy it’s working correctly)
johlju
February 6, 2020, 5:53pm
18
Haha. Sorry I took you down the rabbit hole.