Skip to content

Conversation

taimoorzaeem
Copy link
Collaborator

The scheduled linkcheck job fails without notification. To catch the failure, a github workflow has been added which comments on issue #4106 so that the maintainers get notified.

@taimoorzaeem taimoorzaeem force-pushed the docs/invalid-refs branch 2 times, most recently from a2717fd to 908f594 Compare August 1, 2025 08:05
The scheduled linkcheck job fails without notification. To
catch the failure, a github workflow has been added which
comments on issue 4106 so that the maintainers get notified.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
@taimoorzaeem
Copy link
Collaborator Author

taimoorzaeem commented Aug 1, 2025

The peter-evans/create-or-update-comment uses github API for this. I think we need a GITHUB_TOKEN for this to work.

@steve-chavez
Copy link
Member

Hm, why does Linkcheck / linkcheck (pull_request) fail? I thought we only ran it once a week and not per PR?

@taimoorzaeem
Copy link
Collaborator Author

Hm, why does Linkcheck / linkcheck (pull_request) fail? I thought we only ran it once a week and not per PR?

Yes, you are right. I added a fake link to make it fail. I changed linkcheck temporarily to just run for this PR, to test the commenting workflow. Once this works, I'll remove the fake link before it could be merged.

@taimoorzaeem taimoorzaeem marked this pull request as draft August 1, 2025 14:14
Comment on lines +4 to +6
pull_request: # Temporarily test using PR, remove this before merge
branches:
- main
Copy link
Member

Choose a reason for hiding this comment

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

With the pull_request event you won't have any permissions for the github token, thus you can't create comments. At least not when the PR comes from a fork.

We'd need to create this PR's branch in the postgrest repo itself to be able to test it that way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We'd need to create this PR's branch in the postgrest repo itself to be able to test it that way.

If we are testing it that way, then I guess I should leave this for maintainers with write access on this repo.

Comment on lines +25 to +28
on-linkcheck-fail:
runs-on: ubuntu-latest
needs: linkcheck
if: ${{ always() && needs.linkcheck.result == 'failure' }}
Copy link
Member

Choose a reason for hiding this comment

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

We should not run a second job, but just a second step in the same job. Otherwise that first job will still fail causing another notification to whomever touched the scheduled workflow file last.

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

Successfully merging this pull request may close these issues.

3 participants