Skip to content

Prevent errors in the run for certain repos#12

Open
rajbos wants to merge 3 commits into
self-actuated:masterfrom
rajbos:master
Open

Prevent errors in the run for certain repos#12
rajbos wants to merge 3 commits into
self-actuated:masterfrom
rajbos:master

Conversation

@rajbos

@rajbos rajbos commented Jul 30, 2023

Copy link
Copy Markdown

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

derek Bot commented Jul 30, 2023

Copy link
Copy Markdown

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 "you@domain.com"

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
Signed-off-by: GitHub <rajbos@users.noreply.github.com>
@rajbos

rajbos commented Jul 30, 2023

Copy link
Copy Markdown
Author

Commit has been signed.

@alexellis

Copy link
Copy Markdown
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

Comment thread main.go
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
Copy Markdown
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
Copy Markdown
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?

@alexellis alexellis left a comment

Copy link
Copy Markdown
Member

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