Compare commits

..

1 Commits

Author SHA1 Message Date
Jon
c1869317d4 chore: linting fixes
All checks were successful
Lint (Pull Request) / lint (pull_request) Successful in 10s
ref: #6
2025-07-12 21:38:37 +09:30
6 changed files with 7 additions and 30 deletions

View File

@ -12,9 +12,7 @@ commitizen:
- fix
- test
- refactor
# yamllint disable rule:line-length
commit_parser: ^(?P<change_type>feat|fix|test|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?:\s(?P<message>.*)?
# yamllint enable rule:line-length
name: cz_customize
prerelease_offset: 1
tag_format: $version

View File

@ -13,30 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Enable Matcher Service
run: |
echo "NFC_PROBLEM_MATCHER=${GITHUB_REF_NAME}";
- uses: actions/checkout@v3
- name: Install YAMLLint
run: pip install yamllint
- name: Run YAMLLint
run: |
echo "NFC_PROBLEM_MATCHER_TYPE=YAML-Lint"
yamllint -f github . || true
- name: Install Ansible-Lint
run: pip install ansible-lint
- name: Run Ansible-Lint
run: |
echo "NFC_PROBLEM_MATCHER_TYPE=pylint-json";
ansible-lint -f json . || true

View File

@ -74,4 +74,4 @@ rules:
level: error
type: unix
truthy: disable
truthy: disable

View File

@ -27,12 +27,10 @@
- name: Process Completed workflow_job
# yamllint disable rule:indentation
condition: >
event.meta.headers['X-GitHub-Event'] == 'workflow_job'
and
event.payload.action == 'completed'
# yamllint enable rule:indentation
actions:
- run_playbook:

View File

@ -144,8 +144,8 @@ regex = {
r'"description":\s*"(?P<description>[^"]+)",\s*'
r'"fingerprint":\s*"(?P<fingerprint>[^"]+)",\s*'
r'"location":\s*\{\s*"path":\s*"(?P<path>[^"]+)".+?'
r'"line[s]?":.+?(?P<line>\d+).*?\}}'
r'(?:,\s"content":\s\{"body":\s"(?P<body>.+?)")?'
r'"line[s]?":.+?(?P<line>\d+).*?\}},'
r'(?:\s"content":\s\{"body":\s"(?P<body>.+?)")?'
)
}
@ -284,9 +284,10 @@ for msg_type, value in review_body.items():
if len(api_body['comments']) == 0:
api_body.update({
'body': "G'day, I didn't find any problems to report on",
'event': 'APPROVE'
})
del api_body['body']
data = {

View File

@ -30,9 +30,7 @@
- name: Set required Facts
ansible.builtin.set_fact:
git_url_api: >-
{{ payload.repository.url |
replace((gitea_replace_url | split('/api/'))[0], git_api_url) }}
git_url_api: "{{ payload.repository.url | replace((gitea_replace_url | split('/api/'))[0], git_api_url) }}"
git_url_path_jobs: 'actions/jobs'
head_sha: "{{ payload.workflow_job.head_sha }}"
@ -53,9 +51,7 @@
- name: Fetch job log
ansible.builtin.uri:
url: >-
{{ git_url_api + '/' + git_url_path_jobs
+ '/' + payload.workflow_job.id | string + '/logs' }}
url: "{{ git_url_api + '/' + git_url_path_jobs + '/' + payload.workflow_job.id | string + '/logs' }}"
dest: /tmp/job.log
headers:
Authorization: token {{ lookup('env', 'GIT_API_TOKEN') }}
@ -123,11 +119,9 @@
timeout: 10
validate_certs: false
no_log: "{{ disable_logging }}"
# yamllint disable rule:indentation
when: >
http_get_pull_request.json.state | default('-') != 'closed'
and
http_get_pull_request.status | default(0) == 200
and
not http_get_pull_request.skipped | default(false) | bool
# yamllint enable rule:indentation