repo_name
stringclasses 5
values | pr_number
int64 1.52k
15.5k
| pr_title
stringlengths 8
143
| pr_description
stringlengths 0
10.2k
| author
stringlengths 3
18
| date_created
timestamp[ns, tz=UTC] | date_merged
timestamp[ns, tz=UTC] | previous_commit
stringlengths 40
40
| pr_commit
stringlengths 40
40
| query
stringlengths 11
10.2k
| filepath
stringlengths 6
220
| before_content
stringlengths 0
597M
| after_content
stringlengths 0
597M
| label
int64 -1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apolloconfig/apollo | 3,666 | feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent | ## What's the purpose of this PR
Let user can get interestedChangedKeys through ConfigChangeEvent
## Which issue(s) this PR fixes:
Fixes #3664
## Brief changelog
resolve interestedChangedKeys in class AbstractConfig
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
| Anilople | 2021-05-08T11:52:42Z | 2021-06-11T00:09:40Z | ff38fe06208a3a1e07ce59f8699703cb33bcee2e | 44cf586c4b5b1b9df8c63a49f4b1d3b9d4d01baa | feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent. ## What's the purpose of this PR
Let user can get interestedChangedKeys through ConfigChangeEvent
## Which issue(s) this PR fixes:
Fixes #3664
## Brief changelog
resolve interestedChangedKeys in class AbstractConfig
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
| ./apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/listener/AppInfoChangedListener.java | /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal.listener;
import com.ctrip.framework.apollo.common.dto.AppDTO;
import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.component.PortalSettings;
import com.ctrip.framework.apollo.tracer.Tracer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class AppInfoChangedListener {
private static final Logger logger = LoggerFactory.getLogger(AppInfoChangedListener.class);
private final AdminServiceAPI.AppAPI appAPI;
private final PortalSettings portalSettings;
public AppInfoChangedListener(final AdminServiceAPI.AppAPI appAPI, final PortalSettings portalSettings) {
this.appAPI = appAPI;
this.portalSettings = portalSettings;
}
@EventListener
public void onAppInfoChange(AppInfoChangedEvent event) {
AppDTO appDTO = BeanUtils.transform(AppDTO.class, event.getApp());
String appId = appDTO.getAppId();
List<Env> envs = portalSettings.getActiveEnvs();
for (Env env : envs) {
try {
appAPI.updateApp(env, appDTO);
} catch (Throwable e) {
logger.error("Update app's info failed. Env = {}, AppId = {}", env, appId, e);
Tracer.logError(String.format("Update app's info failed. Env = %s, AppId = %s", env, appId), e);
}
}
}
}
| /*
* Copyright 2021 Apollo Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.ctrip.framework.apollo.portal.listener;
import com.ctrip.framework.apollo.common.dto.AppDTO;
import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.portal.environment.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.component.PortalSettings;
import com.ctrip.framework.apollo.tracer.Tracer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class AppInfoChangedListener {
private static final Logger logger = LoggerFactory.getLogger(AppInfoChangedListener.class);
private final AdminServiceAPI.AppAPI appAPI;
private final PortalSettings portalSettings;
public AppInfoChangedListener(final AdminServiceAPI.AppAPI appAPI, final PortalSettings portalSettings) {
this.appAPI = appAPI;
this.portalSettings = portalSettings;
}
@EventListener
public void onAppInfoChange(AppInfoChangedEvent event) {
AppDTO appDTO = BeanUtils.transform(AppDTO.class, event.getApp());
String appId = appDTO.getAppId();
List<Env> envs = portalSettings.getActiveEnvs();
for (Env env : envs) {
try {
appAPI.updateApp(env, appDTO);
} catch (Throwable e) {
logger.error("Update app's info failed. Env = {}, AppId = {}", env, appId, e);
Tracer.logError(String.format("Update app's info failed. Env = %s, AppId = %s", env, appId), e);
}
}
}
}
| -1 |
apolloconfig/apollo | 3,666 | feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent | ## What's the purpose of this PR
Let user can get interestedChangedKeys through ConfigChangeEvent
## Which issue(s) this PR fixes:
Fixes #3664
## Brief changelog
resolve interestedChangedKeys in class AbstractConfig
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
| Anilople | 2021-05-08T11:52:42Z | 2021-06-11T00:09:40Z | ff38fe06208a3a1e07ce59f8699703cb33bcee2e | 44cf586c4b5b1b9df8c63a49f4b1d3b9d4d01baa | feat(apollo-client): add method interestedChangedKeys to ConfigChangeEvent. ## What's the purpose of this PR
Let user can get interestedChangedKeys through ConfigChangeEvent
## Which issue(s) this PR fixes:
Fixes #3664
## Brief changelog
resolve interestedChangedKeys in class AbstractConfig
Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Read the [Contributing Guide](https://github.com/ctripcorp/apollo/blob/master/CONTRIBUTING.md) before making this pull request.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit tests to verify the code.
- [x] Run `mvn clean test` to make sure this pull request doesn't break anything.
| ./apollo-portal/src/main/resources/static/img/syntax.png | PNG
IHDR kXT gAMA a cHRM z& |