-
Notifications
You must be signed in to change notification settings - Fork 48
Modify commitee TOML and workflow #67
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
Conversation
}); | ||
} | ||
|
||
// Simplify to not use github create at all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this seemingly necessary before, but turns it it actually isn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, will this work if the approval was dismissed?
pull_request: | ||
branches: [ main ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this?
@@ -5,18 +5,19 @@ name: Check PR Approvals | |||
# To protect against that scenario, we can turn on number of approvals required to 2 in the github settings | |||
# of the repository | |||
on: | |||
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't run in the context of a PR though, does it? You could add an option to provide a PR link or a PR number. But I don't know if it's worth it
# for trying to modify the pull request for newer project. | ||
# Source: https://stackoverflow.com/a/76994510 | ||
permissions: write-all | ||
push: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why push?
@@ -73,7 +74,6 @@ jobs: | |||
const tomlContent = fs.readFileSync('.github/pull_requests.toml', 'utf8'); | |||
console.log('TOML content:', tomlContent); | |||
const tomlData = toml.parse(tomlContent); | |||
console.log('Parsed TOML data:', JSON.stringify(tomlData, null, 2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered the business logic to a script instead of hard coding it in here? I think it is usually much easier to debug and run it locally. For example, you could create a script that takes as an argument a list of logins and the script succeeds if and only if the minimum number of people in the committee has been achieved.
Or the script output the number of people from the committee from that list and you only check here if the number is >= minimum requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for that idea! I shall move the logic to its own script ad use gh command line to try and rerun old failing checks.
Closing this approach in favor of #74 which is simpler and more reliable. Starting afresh to test the necessary conditions as well. |
This adds @carolynzech to the committee file and modifies the workflow to prevent existing checks from being re-used. This will create a more reliable status check.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.