Modify commitee TOML and workflow#67
Conversation
| }); | ||
| } | ||
|
|
||
| // Simplify to not use github create at all |
There was a problem hiding this comment.
Why was this seemingly necessary before, but turns it it actually isn't?
celinval
left a comment
There was a problem hiding this comment.
BTW, will this work if the approval was dismissed?
| pull_request: | ||
| branches: [ main ] |
| # 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.
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: |
| 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.
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.
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.