-
Notifications
You must be signed in to change notification settings - Fork 16
Add Edits From NPD Repo #343
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
base: dev
Are you sure you want to change the base?
Conversation
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
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.
LGTM!
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.
After resolving the secrets variable error, this should be good to go!
Another question: does the .gitleaks.toml
file have to live in the root directory? Could this be moved to the .github
directory?
id: contrib_list | ||
uses: akhilmhdh/[email protected] | ||
env: | ||
{% raw %} |
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.
Did some testing to create a new repo using cookiecutter and got the error below:
Unable to create file '.github/workflows/contributors.yml'
Error message: 'secrets' is undefined
I think it's cause we need to have the {% raw %}
tags embedded between each secrets
variable because cookiecutter interprets it as a variable as part of its context
{% raw %} | ||
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
{% endraw %} |
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.
Add raw tags
- name: Update COMMUNITY.md | ||
run: | | ||
{% raw %} |
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.
Add raw tags
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
{% endraw %} | ||
|
||
GITHUB_TOKEN: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }} |
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.
Add raw tags
{% raw %} | ||
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
{% endraw %} |
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.
Add raw tags
{% raw %} | ||
CONTRIBUTORS="${{ steps.get_contributors.outputs.contributors }}" | ||
{% endraw %} |
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.
Add raw tags
{% raw %} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
{% endraw %} | ||
|
||
GITHUB_TOKEN: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }} | ||
|
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.
Add raw tags
env: | ||
{% raw %} | ||
|
||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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.
Add raw tags
{% raw %} | ||
CONTRIBUTORS="${{ steps.get_contributors.outputs.contributors }}" | ||
{% endraw %} |
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.
Add raw tags
Add Edits From NPD Repo
Problem
Currently, we have issues with our contributors.yml workflow. We also do not have a default
.gitleaks.toml
file template that we include in the repositories that are generated.Solution
In the contributors.yml file, use a personal access token in the checkout action to make sure that we are using a user that has push access to main. This way we can circumvent branch protections for the action.
Also, added a
.gitleaks.toml
file to all tiers as well as this repository. This file includes gitleaks regex patterns for common keys. It can and should be configured for different project types.