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

Prevent errors in the run for certain repos #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rajbos
Copy link

@rajbos rajbos commented Jul 30, 2023

I've had this happen in a repo with a private vulnerability disclosure that did not have actions available, and thus broke the entire run. This change fixes that.

I expect the same thing will happen if actions is not enabled (for example on a fork).

Fixes #13

@derek
Copy link

derek bot commented Jul 30, 2023

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

💡 Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name"
git config --global user.email "[email protected]"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force.
If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

@derek derek bot added the no-dco label Jul 30, 2023
@rajbos
Copy link
Author

rajbos commented Jul 30, 2023

Commit has been signed.

@alexellis
Copy link
Member

Hi @rajbos if you'd like us to accept this PR, please follow the proper sign-off instructions of the DCO using a real email and name.

If you don't want to do this, we'll have to close the PR.

Alex

@@ -170,6 +170,11 @@ func main() {
log.Printf("Listing workflow runs for: %s", repo.GetFullName())
if orgName != "" {
runs, res, err = client.Actions.ListRepositoryWorkflowRuns(ctx, orgName, repo.GetName(), opts)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is a good fix.

You need to look at the specific error and HTTP code and determine if the problem is due to actions being disabled on the repo or something else, and if it's something else, it must continue to fail.

Copy link
Member

Choose a reason for hiding this comment

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

I've tested this on repos which have actions disabled and get no errors.

Can you share the exact console output and how to reproduce it?

Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Changes needed, plus DCO.

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.

Issue running for certain repos
2 participants